-
Notifications
You must be signed in to change notification settings - Fork 103
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
Fail if current directory is deleted [rsync issue] #269
Comments
Well the error message is generated by the underlying rsync tool. |
CREATE_DIRS is true. I think there is a misunderstanding, the error happens if the CWD (current working directory) is in a deleted directory when calling the tool. However the CWD should play no role, I use absolute paths only. |
Indeed, there was a misunderstanding. |
Well you could change the CWD... or you could test for this situation and give a better error message.. For example: It's no bigy tough, it's a rare edge case. Beeing regulary using osync happily for years now. |
Change the cwd to what ? Current user home ? tmp ? As for |
Well it doesnt change the CWD for me, unless you call anynthing with ". myscript.sh" when that tools the CWD it will be back as the environment of the caller will not be affected by what the callee does. Dunno, do people use osync ever with relative paths? If so we shouldnt change the CWD since that would mess up their expectations, if its used with absolute paths, it makes sense to normalize the CWD (user home or root). When I wrote a daemon back the day, literature told me, I should change my CWD to root. But I agree, ultimately it is rsync that is messing up, as the CWD shouldnt matter if its not called with a relative local dir. |
PS: I can also simply do Or better yet, just |
^^ Glad you figured it out. That's the script's job indeed, not the tool's job. |
Okay, last time to waste your time on this. Sorry.
I think 'CWD' should be set to INITIATOR_SYNC_DIR, and INITIATOR_SYNC_DIR being a relative path should be an error, no? |
Describe the bug
I just got following error.
To Reproduce
The issue was the current working directory does not exist. (I deleted it in another window).
Albeit IMO the CWD shouldnt matter, should it?
Expected behavior
It's up to you, either it should work, even if the CWD doesn't exit anymore on disk or maybe make a more better error message, took me a little while to figure out what was going on...
The text was updated successfully, but these errors were encountered: