Option 'force' issues write protection on updated file
Original report by Anonymous.
Hi there,
the option 'force' switches the write protection on for the synced file if it allready existed in the destination folder (but with an older timestamp). That means that the copied file in the dest-folder is now write protected and cant be overwriten the next time the content/timestamp changes.
Hope i was somehow clear :)
I just disabled force and now the sync of updated files works now
i guess its this line: syncer.py : 404 OS: Windows 10
Thanks for the work!
Yes, that is somehow clear. I am not sure how I would solve the problem though. Line 404 comes from the original codebase I forked dirsync from, and I would have to dig to find out what to replace the 1638 with.
I would gladly accept a PR to resolve the issue though.
I ran into this. Thanks for the force switch help.
On Windows10 Python 3.7. dirsync 2.2.4 final
#404 os.chmod(file2, 1638) # 1638 = 0o666
os.chmod(file2, 1638) - sets the Windows Read-Only attribute to True os.chmod(file2, 0o666) - sets the attribute to False
I'm guessing in this case we want it to be False if we want to force it so we can overwrite it.
As read elsewhere chmod does not do much in Windows apart from setting that flag.
I am not an expert on this especially on other operating systems so would not want to do a PR to fix what would be a windows only issue.