Alternative location for .duplicacy directory?

I’ll take a look tomorrow. Thank you for your work!

It looks good to me. I think it is ready for a PR.

Here is the pull request …

Just rebased on the very latest master ( main directory renamed)

Hi !

I just found a regression in the -pref-dir behavior and I’m asking for advice :

situation

  • repository connected to Onedrive storage
  • pref-dir is located in another partition ( actually inside docker container in two differents volumes)
  • performed a full-backup -> OK
  • deleted a bunch of files ->Oups :wink:
  • trying to restore the deleted files from the backup ( both with and without -overwite option
  • restore fails with
    Failed to rename the file /pref-dirs/TEST_BACKUP/temporary to /datahome/TEST_BACKUP/CalibreKOBOEtienne/Veronica Roth/Allegeance (704)/Allegeance - Veronica Roth.epub: rename /pref-dirs/TEST_BACKUP/temporary /datahome/TEST_BACKUP/CalibreKOBOEtienne/Veronica Roth/Allegeance (704)/Allegeance - Veronica Roth.epub: invalid cross-device link

Look like the line

err = os.Rename(temporaryPath, fullPath) in duplicacy_backupmanager around line 1228 fails because os.Rename can’t move files across filesystems. [1]

What’s your preferred way to fix this ?

  • download file in the repository itself ( eg: directory where .duplicacy file is located) instead of .duplicacy directory ?
  • cope with exception and try to copy/delete instead of rename ? ( not so easy to do it right …)
  • another clever idea ?

Sorry for the regression …

Etienne
PS: do you want me to file a bug in github directly ?

[1] https://groups.google.com/forum/#!topic/golang-dev/5w7Jmg_iCJQ

I think the best option is to enforce the in-place mode if the preference path is not under the repository. Just set the variable inPlace to true and it should work.

Let me fix this as I’ve made some changes to the GetDuplicacyPreference function in my branch. Yes, please file a bug in github.

Issue created !

Sorry about the delay. I’ve been busy working on the performance study of Duplicacy and finally had some time to fix bugs accumulating over the past two weeks!

Let me know if the fix works.