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

bsync errors out on conflict #38

Open
dieterdeyke opened this issue Mar 3, 2019 · 8 comments
Open

bsync errors out on conflict #38

dieterdeyke opened this issue Mar 3, 2019 · 8 comments

Comments

@dieterdeyke
Copy link

The following sequence crashes bsync:

#! /bin/sh

rm -rf testdir1 testdir2
mkdir testdir1 testdir2
echo xxxxx > testdir1/data
bsync testdir1 testdir2
sleep 2
rm -rf testdir1
touch testdir2/data
bsync testdir1 testdir2

@dooblem
Copy link
Owner

dooblem commented Mar 4, 2019

Hello @dieterdeyke

Can you paste the ouput you get ?

On my side this is not a crash (it just tells me that the first directory is missing):

$ sh -x ./mytest.sh 
+ rm -rf testdir1 testdir2
+ mkdir testdir1 testdir2
+ echo xxxxx
+ bsync testdir1 testdir2
Loading filelists...
Old filelist not found. Starting with empty history.

(LEFT DIR CONTENT)                   (RIGHT DIR CONTENT)             (ACTION)

data                            -->                                  (copy)

Todo in testdir1: 
Todo in testdir2: cp:1
Apply actions? [y/N] y

Applying actions...
rsync: data
Updating filelists...
Done!
+ sleep 2
+ rm -rf testdir1
+ touch testdir2/data
+ bsync testdir1 testdir2
Loading filelists...
Error: could not open directory: testdir1/ (is it created?)

@dieterdeyke
Copy link
Author

dieterdeyke commented Mar 5, 2019 via email

@dooblem
Copy link
Owner

dooblem commented Mar 5, 2019

Thanks for the details.
Feel free to paste the output / exception of the error even if you are not able to reproduce it.
It may give me clues of what is going wrong.

@dieterdeyke
Copy link
Author

dieterdeyke commented Mar 5, 2019 via email

@dieterdeyke
Copy link
Author

Just saw that github does not recognize email attachments, so I will attach those files here:

test-bsync.txt
typescript.txt

@dooblem
Copy link
Owner

dooblem commented Mar 5, 2019

Thanks ! Amazing work @dieterdeyke .
After remounting the dos fs, the file time seems rounded.
I'm checking to fix this.

@dooblem
Copy link
Owner

dooblem commented Mar 5, 2019

I first fixed a bug when showing conflict of a file in vfat. As vfat files do not have permissions I should not try to display them.

Now it's not crashing anymore, but I still need to find a way to work around the vfat time problem, as it wrongly detect changes.

I will probably round the file time when on vfat, but I still need a way to detect if a directory is on vfat or not. I may use df for that but I don't think this is really portable (does it work on mac?)...

@dooblem dooblem mentioned this issue Mar 5, 2019
@dieterdeyke
Copy link
Author

dieterdeyke commented Mar 6, 2019 via email

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