Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--sync switch is not preserving timestamps #435

Closed
EthraZa opened this issue Aug 26, 2021 · 3 comments
Closed

--sync switch is not preserving timestamps #435

EthraZa opened this issue Aug 26, 2021 · 3 comments

Comments

@EthraZa
Copy link

EthraZa commented Aug 26, 2021

I'm using minify --all --sync --recursive ... but it is not preserving files dates and times.
There is an option or is it possible to implement it to act more like a cp -p or -a?

From man cp:

-a, --archive
              same as -dR --preserve=all
-p     same as --preserve=mode,ownership,timestamps
-d     same as --no-dereference --preserve=links
-R, -r, --recursive
              copy directories recursively

Or if minify --sync could just be like cp --preserve=all, at least for the files that where not minified, would be great.

@tdewolff
Copy link
Owner

Thanks for the suggestion! This seems like a great idea, I will try and implement this as soon as I get some time on my hands!

@tdewolff
Copy link
Owner

tdewolff commented Sep 9, 2021

Please check this implementation (remark: setting file ownership only works on Linux)

You can now pass -p or --preserve to keep mode,ownership,timestamps, or set it manually using e.g. --preserve=mode,timestamps, exactly like cp!

@EthraZa
Copy link
Author

EthraZa commented Sep 14, 2021

-p seems working like a chram.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants