-
Notifications
You must be signed in to change notification settings - Fork 98
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
Deleted empty folders do not sync between the initiator and target #264
Comments
I'd really need a reproducible example, eg folder tree before deletion, folder tree after sync, full error message, osync version. |
Thank you for your reply. Here is a reproducible example: Create two folders inside the initiator folder (called initiator_folder). One subfolder is not empty (subfolder_1) and the other one is empty (subfolder_2):mkdir -p "$HOME/Desktop/initiator_folder/subfolder_1" Now create the target folder (target_folder):mkdir -p "$HOME/Desktop/target_folder" Using osync:bash osync.sh --initiator="$HOME/Desktop/initiator_folder" --target="$HOME/Desktop/target_folder" So far so good. But now let's remove the empty subfolder and run osync again. Please note that if we remove the non empty folder, it will work with no errors. The problem is with the empty folders.rm -rf "$HOME/Desktop/initiator_folder/subfolder_2" The following error message will appear:cp: /Users/xx/Desktop/target_folder/subfolder_2 is a directory (not copied). I believe that this is mainly because of (rm -f and cp -p) when used with folders. On macOS, you need the "r" option for recursive with folders. So, we should use (rm -rf, and cp -rp or cp -Rp). Finally, I just saw this similar discussions here: #254 |
So you're running osync 1.3-rtm on MacOS which version ? I'd be thrilled to test your "-r" reasoning, but I dont have any macs :( |
I'm running osync-1.3 with macOS Sonoma (14.4.1). |
I did the following and it works perfectly now: |
Please have a look at: #254 |
That's a bit broad ;) Thank you for your diag ;) |
Thank you for your help. I'm not sure if I should mention this here, but the following typos are in the osync.sh file. "# Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console" possibity should be possibility Thanks again |
Sure. I'll have them sorted. Thanks. |
Empty folders can by sync between the initiator and target. However, when I delete some of them, say, inside the initiator folder, the deletion does not reflect to the target folder. In fact, it breaks the whole synchronization.
I got this message:
cp: /Users//Desktop/B/A is a directory (not copied).
TIME: 1 - \e[91mCannot move [/Users//Desktop/B/A] to deletion directory [/Users/*/Desktop/B/.osync_workdir/deleted] on target.\e[0m
TIME: 1 - \e[1;33;41mDeletion on target replica failed.\e[0m
TIME: 1 - \e[91m_ExecTasksPidsCheck called by [Sync_deletionPropagation] finished monitoring pid [6841] with exitcode [1].\e[0m
TIME: 1 - \e[91mosync finished with errors.\e[0m
Please note that this behavior disappears and everything works correctly if I set: SOFT_DELETE=false. Also, I'm using a Macbook Pro with Sonoma installed.
The text was updated successfully, but these errors were encountered: