Unnecessary modification of project

For those of us using SVN – okay, so I’m probably the only one, especially under Windows – there is a minor issue/bug with project modification.

TortoiseSVN for Windows announces the modification status of files and folders by changing the icon associated with the object if it has been modified. By doing so, the user is alerted to the fact that a checkin is required to keep one’s repository up-to-date with the latest changes.

I saw the “up-to-date” icon on my Scrivener project folder (a green checkmark over the Windows folder icon) before I opened the project. Then I ran Scrivener, clicked the required “Try” button as usual, and it opened that project. I looked around for a few moments at various things in the project and then closed it having made no modifications.

When I came back to start working with that project again and before I opened Scrivener, my Scrivener project folder had been modified, that is, I saw a red exclamation point over the Windows folder icon. I think Scrivener is making some gratuitous change to a project upon every open even if the user makes no changes. If so, this makes it very difficult to use with a source control backend since the user can never tell if the project has actually changed.

I just ran the open/close sequence a couple of times, updating SVN each time. It looks like “binder.autosave” and “binder.backup” are updated even if the user makes no changes to a project. The modification seems to happen even before the registration dialog is posted. I hadn’t even clicked “Try” and the project’s icon was already modified.

Yes, there are certain updates made within the project when you open it, because Scrivener saves certain “changes” you make like which document you’re viewing (even if you didn’t alter the text), what parts of the binder are expanded and collapsed, etc. It also updates a few of the other internal files, as you noticed; this is automatic on opening the file, creating a fail-safe copy of your project binder. Likewise, every time you open the project a userlock file gets added to the folder, to help prevent corruption from having the project open in two locations simultaneously; this is deleted when you close the project, but it might get registered as a modification to the folder. All in all, there’s not really a way around doing this given the way Scrivener needs to function.