Ignore this (was:Dropbox + Save As...Danger, Will Robinson!)

Edit: With MM’s explanation on Save As below, my entire theory is blown. Please disregard this message. :blush:

We often mention dropbox as a way to keep projects in sync between multiple computers, or just to keep a live backup in the cloud of what you’re writing. But time and again, someone will have some issue with disappearing files in their project, only to discover that scrivener has merely lost track of those files, which are still in the project, waiting on a Project->New Text invocation.

I think one of the biggest culprits of this is using Save As on a project in a dropbox/sync service folder. My reasoning is this (please correct me if I get any details wrong):

  • Scrivener’s Save As function renames the project directory (let’s call it myproj.scriv)
  • Dropbox begins to sync a delete of the original myproj.scriv, and queues up the upload of the “new” myproj-backup.scriv directory
  • Scrivener creates a copy of myproj-backup.scriv named “myproj.scriv”
  • Dropbox halts the sync of the deletion of myproj.scriv to its servers, and re-syncs any of the files in the project that it doesn’t still have from before the beginning of the delete. Then it continues to upload the myproj-backup.scriv file. (Or maybe it pulls down the old myproj.scriv folder & contents from the server?)
  • In the midst of all this syncing, the user creates a new file in the original project and continues, while the index file in the project is mistakenly kept from before the Save As was revoked.

A more common issue is that people don’t realize that Save As puts them in the new version of the project, and they continue to edit that, only to later return to the original where the new work doesn’t exist. But that’s another story.

Solutions? One that I can think of is to create a pop-up when a user first invokes “Save As”, directing them to the safer “Back up to” menu item. A check-box to “never show this prompt again” would mitigate the annoyance. Another is to rewrite the Save As function (assuming it works as described above) to create a copy of the original without first renaming it, and then closing the original and opening the new one. That would make Save As play nice with syncing services.


P.S. I put this in the Mac section only because there’s no generic tech support section, and I didn’t put it in Software by other Folk because it has direct implications regarding Scrivener’s inner workings. Feel free to relocate this thread if I’ve chosen poorly.

This isn’t quite how it works. Save As creates a new copy of the project, using the name and location the user specifies in the Save As dialog. The original isn’t renamed or deleted at all in the process. It is saved and closed (without invoking the automatic backup set to run on close), so it’s important to realise that changes made in the project up to the point of selecting “Save As” will remain in the original.

As far as working with Dropbox and Save As, the basic Dropbox rules of always allowing a complete sync apply, but there’s no additional confusion with renaming files or halting syncs and so on. If the Save As location is in Dropbox, files will start getting created and uploaded as soon as the action runs, and if the original project is in Dropbox, its files will all update as well as the project autosaves and closes in the background. (This all assumes of course that Dropbox is actively running and not paused.) So cutting off the internet before the sync finishes could mess with both projects, just depending what order Dropbox is syncing items and how much it’s done, but it’s not going to be any different from what would usually happen if you didn’t allow the full sync.

Thanks for clarifying that. So much for my pet theory on why some people’s projects loose track of newer files.

so what you,re saying is that this thread is now up for grabs and can be derailed guilt free

hmmm. the fun,s all gone out of it somehow

No! You may not hijack this thread! Bad kitty!

(does that help?)