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

Readonly source-file can't watch #53

Closed
schutm opened this issue Jan 16, 2022 · 3 comments
Closed

Readonly source-file can't watch #53

schutm opened this issue Jan 16, 2022 · 3 comments

Comments

@schutm
Copy link

schutm commented Jan 16, 2022

The target will get the same chmod-attributes as the source. As a result in watch-mode cpx2 isn't able to update changes, if the write-bit isn't set on source.

So either the initial chmod needs to include the write-bit explicitly or just before the pipe(write) the write-bit needs to be set.

@bcomnes
Copy link
Owner

bcomnes commented Feb 1, 2022

Interesting. Is this also a problem with the original cpx?

@schutm
Copy link
Author

schutm commented Feb 2, 2022

Yes, it is also a problem with the original cpx. Another solution could be to move the chmod into the 'preserve'-section, although that may break things for current users.

I can create a PR if you can give me the desired solution:

  • Include the chmod in the preserve-section (easy, but might break current usage)
  • Always include the write-bit in the chmod (easy, but not 100% correct)
  • Set the write-bit just before copying (a bit more difficult to include it in a 'clean' way in the code, but 100% correct)

Best regards,
--Martin

@bcomnes
Copy link
Owner

bcomnes commented Feb 4, 2022

Set the write-bit just before copying (a bit more difficult to include it in a 'clean' way in the code, but 100% correct)

Seems like this is the best option, though I think it should be an option/flagged... since it effectively ignores flags which tend to be set for a reason (even if they don't quite make sense in this context).

@bcomnes bcomnes closed this as completed in 46e9705 Feb 8, 2022
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