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

Incomplete Sync #193

Open
diogotcorreia opened this issue Feb 2, 2024 · 1 comment
Open

Incomplete Sync #193

diogotcorreia opened this issue Feb 2, 2024 · 1 comment

Comments

@diogotcorreia
Copy link

diogotcorreia commented Feb 2, 2024

While doing a sync for the first time, if it is interrupted for some reason (e.g., #176), it seems to now finish syncing everything.

How To Reproduce

I'm using Google Drive for testing this.
Google Drive allows for files with duplicate names, hence the example below.

.
├── ...
├── celeste-test
│  └── my-folder
│     ├── a.txt
│     ├── a.txt
│     └── b.txt

I have also managed to reproduce this with just one directory level instead of two.

I've tried to reproduce this by specifying a remote path other than the root directory, but it didn't seem to work properly, and judging by the contents of the database, something weird is going on with the paths as well:

sqlite> select * from sync_items;
1|1|/home/dtc/gdrive-test/.sync-exclude.lst|celeste-test/.sync-exclude.lst|1706887420|1706887420
2|1|/home/dtc/gdrive-test//.sync-exclude.lst|celeste-test/.sync-exclude.lst|1706887420|1706887420
3|1|/home/dtc/gdrive-test//my-folder/a.txt|celeste-test/my-folder/a.txt|1706887313|1706887313
4|1|/home/dtc/gdrive-test/my-folder/a.txt|celeste-test/my-folder/a.txt|1706887313|1706887313
5|1|/home/dtc/gdrive-test/my-folder|celeste-test/my-folder|1706887435|1706887083

Anyway, after syncing and getting the panic from the aforementioned issued, this is the state of the database:

sqlite> select * from sync_items;
...
17|1|/home/dtc/gdrive-test/celeste-test/my-folder/a.txt|celeste-test/my-folder/a.txt|1706887313|1706887313

And this is the state of the folder:

gdrive-test/celeste-test/my-folder
❯ l
Permissions Size User Date Modified Name
.rw-r--r--    15 dtc   2 Feb 16:21  a.txt

Finally, after starting celeste again, and letting it finish syncing, b.txt does not show up and the database ends up like this:

sqlite> select * from sync_items;
...
17|1|/home/dtc/gdrive-test/celeste-test/my-folder/a.txt|celeste-test/my-folder/a.txt|1706887313|1706887313
18|1|/home/dtc/gdrive-test/celeste-test/my-folder|celeste-test/my-folder|1706888530|1706887083
19|1|/home/dtc/gdrive-test/celeste-test|celeste-test|1706888529|1706862150
@diogotcorreia
Copy link
Author

Some more information: mounting the drive with rclone mount, shows me that one of the a.txt files is not synced, so rclone seems to be handling this edge case somehow.

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

1 participant