BUG: Rename a directory between shares


rdebath

Recommended Posts

I have setup two shares on a Linux i386 machine in directories /home/btsync/data.000 and /home/btsync/data

On another i386 machine in one of the shares I created a directory and populated it with cats.

(for directory /home/btsync/data )

After the transfer completes I move the directory from /home/btsync/data.000/cats to /home/btsync/data/cats ... chaos ensues.

Once It settles down I turn on the logging and try to work out what happened.

There seems to be some confusion because I'm moving the data between two shares and it's assuming that if the directory is move from a share to a share it must be in the same share. So I'm getting a '000' directory created in the /home/btsync/data share because it chopped the wrong bit off the front.

I've saved the whole log file if you need it, but here's what I think is the significant bit ...

[20130328 12:46:30] [OnNotifyFileRename] /home/btsync/data.000/tempdir -> /home/btsync/data/Testdir

[20130328 12:46:41] SyncFilesController[file rename]: renaming /home/btsync/data.000/tempdir to /home/btsync/data/Testdir

[20130328 12:46:41] SyncFilesController[file rename]: unable to find rename source, delegating to [file update]

[20130328 12:47:28] [OnNotifyFileRename] /home/btsync/data/Testdir -> /home/btsync/data.000/Testdir

[20130328 12:47:39] SyncFilesController[file rename]: renaming /home/btsync/data/Testdir to /home/btsync/data.000/Testdir

[20130328 12:47:39] SyncFilesController: Processing file renaming Testdir/testfile -> 000/Testdir/testfile --- :blink:

[20130328 12:54:46] SyncFilesController: Detected deleted or renamed file 000/Testdir

[20130328 12:54:46] SyncFilesController: Detected deleted or renamed file 000/Testdir/testfile

[20130328 12:54:46] SyncFilesController: Detected deleted or renamed file 000/tempdir

[20130328 12:54:46] SyncFilesController: Detected deleted or renamed file dir

Link to post
Share on other sites

Off the top of my head, I wonder if it's the ".000" in the folder name that's confusing BitTorrent Sync? i.e. BitTorrent Sync is seeing that as a file extension, rather than a directory name?

Do you get the same behavior if you rename the directory without the period/point character in it? i.e. "data" -> "data000"

Link to post
Share on other sites

Off the top of my head, I wonder if it's the ".000" in the folder name that's confusing BitTorrent Sync? i.e. BitTorrent Sync is seeing that as a file extension, rather than a directory name?

Do you get the same behavior if you rename the directory without the period/point character in it? i.e. "data" -> "data000"

How about this one ...

[20130328 13:42:29] SyncFilesController[file updated]: processing file /home/btsync/data/Testdirtwo 1367152938 0

[20130328 13:42:42] [OnNotifyFileChange] /home/btsync/data/Testdirtwo/thetestfile.txt

[20130328 13:42:42] [OnNotifyFileChange] /home/btsync/data/Testdirtwo/thetestfile.txt

[20130328 13:42:42] [OnNotifyFileChange] /home/btsync/data/Testdirtwo/thetestfile.txt

[20130328 13:42:53] SyncFilesController[file updated]: processing file /home/btsync/data/Testdirtwo/thetestfile.txt 1367152962 0

[20130328 13:42:53] New torrent created for file Testdirtwo/thetestfile.txt mt:1367152962 CFFA50DD1D2A2D9A9E0965D893D547A7ADE84CDE

[20130328 13:43:23] [OnNotifyFileRename] /home/btsync/data/Testdirtwo -> /home/bt/data/Testdirtwo

[20130328 13:43:35] SyncFilesController[file rename]: renaming /home/btsync/data/Testdirtwo to /home/bt/data/Testdirtwo

[20130328 13:43:35] SyncFilesController: Processing file renaming Testdirtwo/thetestfile.txt -> dirtwo/thetestfile.txt

Yup as predicted; they're chopping off the wrong share prefix (plus the slash that isn't there of course)

Don't try this one ...

[20130328 13:43:23] [OnNotifyFileRename] /home/btsync/data/Testdirtwo -> /home/bt/data/Testdirtwo

[20130328 13:43:35] SyncFilesController[file rename]: renaming /home/btsync/data/Testdirtwo to /home/bt/data/Testdirtwo

[20130328 13:43:35] SyncFilesController: Processing file renaming Testdirtwo/thetestfile.txt -> dirtwo/thetestfile.txt

[20130328 13:49:36] [OnNotifyFileRename] /home/btsync/data/Test -> /home/bt/data/Test

[20130328 13:49:47] SyncFilesController[file rename]: renaming /home/btsync/data/Test to /home/bt/data/Test

[20130328 13:49:47] SyncFilesController: Processing file renaming Test/dirthree -> /dirthree

[20130328 13:49:47] SyncFilesController: Processing file renaming Test/dirthree/testfilethree.txt -> /dirthree/testfilethree.txt

[20130328 13:51:24] SyncFilesController: Detected deleted or renamed file

[20130328 13:51:24] SyncFilesController: Detected deleted or renamed file /dirthree

[20130328 13:51:24] SyncFilesController: Detected deleted or renamed file /dirthree/testfilethree.txt

[20130328 13:51:24] SyncFilesController: Detected deleted or renamed file dirtwo

[20130328 13:51:24] SyncFilesController: Detected deleted or renamed file dirtwo/thetestfile.txt

Bye bye whole share; even .SynchTrash is moved into the Trash, but there seems to be no serious security problem BTSync did not do an "rm -rf /" ... :D

However, the remote did accept an instruction to delete the entire share including the .Sync* files ... that's not right.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.