FFS options save fails silently if GlobalSettings.xml is open elsewhere

Discuss new features and functions
Posts: 2
Joined: 18 Aug 2023

smeghead

Howdy

I've been modifying a Windows backup batch file to test for log format as I need it to be Text not HTML. While doing this I had GlobalSettings.xml open in Notepad++ to check for the search string I needed, viewing not editing.

At the same time I had FFS open, I went into options & changed the format to Text and saved, no error reported but when I close FFS & reopen the setting is still set to HTML.

At a guess FFS is prob trying to set an exclusive lock on the file on opening but not reporting that it can't so any changes are not written back to the config file. I'd suggest checking the settings file lock status on open & revoking any lock on it or change the lock type .. of course if FFS needs an exclusive lock revoke is the only real option. I don't know what type of lock Notepad++ uses by default so it might be using an exclusive lock itself.

Cheers
Posts: 64
Joined: 8 Jun 2023

Synchronizator

modifying
[...]
GlobalSettings.xml open in Notepad++
[...]
At the same time I had FFS open
[...] smeghead, 18 Aug 2023, 06:56
[and got no info about conflict]

Confirmed in version 12.4 on Windows 10 Enterprise 20H2 x64
User avatar
Posts: 2288
Joined: 22 Aug 2012

Plerry

As explicitly mentioned (even in bold) in the FFS Manual:
... you should apply manual changes [to GlobalSettings.xml] only while FreeFileSync is not running.
Posts: 2
Joined: 18 Aug 2023

smeghead

.. true enough but to fail silently is a poor process, the process should check for a file lock on the config file & if one found then reject the save. The issue I've encountered is actually the reverse of the info in the manual, I'm saving within the FFS options menu while the XML file is open in Notepad for reading, not trying to save the XML file.
Posts: 944
Joined: 8 May 2006

therube

Confirmed in version 12.4 on Windows 10 Enterprise 20H2 x64
And I cannot confirm, Win7 x64, 12.5.

I do get a change notification - from the editors (Notepad++, Win32pad...),
but the changes are effected in GlobalSettings.xml, & so do persist on FFS reopen.


(Now, if you were to actually write the old version out to disk - from within the editor, that is a different matter, because then you would have overwritten what FFS itself had done.)