Relative paths for files and backups

User avatar
llis
Posts: 5
Joined: Thu Dec 12, 2013 4:36 pm
Platform: Mac
Contact:

Fri Feb 02, 2018 2:18 pm Post

Dropbox sync has one critical flaw: From what I can see right now, Scrivener records only absolute paths for files. This includes inserted linked files and backup paths. This causes a problem when working on different computers. The absolute path is almost always going to be different on each machine. Different volumes, different usernames within which the Dropbox folder resides, etc.

When I open on my laptop computer my project I mostly work on at my desktop, suddenly all my inserted linked files are missing because Scrivener is looking for the files on a nonexistent volume for a nonexistent username on this computer. This also means I may not set up a custom project backup folder because the backup will fail every time I attempt it on a computer without that absolute filepath.

Feature: The ideal solution would be to define these paths relative to the Scrivener project itself.

So with for example, in a project called "project" that is located:

Code: Select all

[filepath]/Dropbox/apps/Scrivener project.scriv


An inserted file:

Code: Select all

[filepath]/Dropbox/project-files/file.jpg


would become:

Code: Select all

../../project-files/file.jpg


and the path for project backups would become:

Code: Select all

[filepath]/Dropbox/backups/project-backups/


would become:

Code: Select all

../../backups/project-backups/


Maybe there are complications to making this happen across platforms? I don't know. I do know that open source cross-platform projects like Sigil and Calibre define all filepaths as relative. Relative filepaths are nearly a ubiquitous use case.

(My apologies if this is a duplicate. My search found random comments but no thread about this.)