nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
3.07k stars 804 forks source link

Debug Builds Read/Write To Production Preferences #2941

Open elsiehupp opened 3 years ago

elsiehupp commented 3 years ago

Actual behavior

If you follow the existing build instructions on macOS, under which ostensibly builds are marked as debug builds, the resulting builds read and write from the same preference files as production builds, which makes it easier for test builds to break existing production setups. The files I'm thinking of are the following:

~/Library/Preferences/com.nextcloud.desktopclient.plist
~/Library/Preferences/Nextcloud/*

(There may be others, but I haven't dug around particularly thoroughly.)

Expected behavior

It would be safer if debug/testing builds appended a string (such as "debug" or "dev") to the preference filenames they use, so that they would be less likely to conflict with an existing production install. On macOS, this could result in something like the following:

~/Library/Preferences/com.nextcloud.desktopclient-dev.plist
~/Library/Preferences/Nextcloud-dev/*

I haven't looked into how preferences are stored on Windows or Linux, but appending them with "-dev" for debug/testing builds would probably help there, too.

Client configuration

Client version: 3.1.2 Operating system: macOS Big Sur 11.2.1 OS language: English (United States) Installation path of client: /Applications (production), ~/Builds (debug/testing)

elsiehupp commented 3 years ago

Appending "-dev" to the name of the application/executable itself (i.e. the themed names) for debug builds might also help with various conflicts.