{"action":"closed","issue":{"url":"https://api.github.com/repos/lukesampson/scoop-extras/issues/1853","repository_url":"https://api.github.com/repos/lukesampson/scoop-extras","labels_url":"https://api.github.com/repos/lukesampson/scoop-extras/issues/1853/labels{/name}","comments_url":"https://api.github.com/repos/lukesampson/scoop-extras/issues/1853/comments","events_url":"https://api.github.com/repos/lukesampson/scoop-extras/issues/1853/events","html_url":"https://github.com/lukesampson/scoop-extras/issues/1853","id":419929170,"node_id":"MDU6SXNzdWU0MTk5MjkxNzA=","number":1853,"title":"Zeal doesn't write to persisted preferences file","user":{"login":"studoot","id":799344,"node_id":"MDQ6VXNlcjc5OTM0NA==","avatar_url":"https://avatars1.githubusercontent.com/u/799344?v=4","gravatar_id":"","url":"https://api.github.com/users/studoot","html_url":"https://github.com/studoot","followers_url":"https://api.github.com/users/studoot/followers","following_url":"https://api.github.com/users/studoot/following{/other_user}","gists_url":"https://api.github.com/users/studoot/gists{/gist_id}","starred_url":"https://api.github.com/users/studoot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/studoot/subscriptions","organizations_url":"https://api.github.com/users/studoot/orgs","repos_url":"https://api.github.com/users/studoot/repos","events_url":"https://api.github.com/users/studoot/events{/privacy}","received_events_url":"https://api.github.com/users/studoot/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-03-12T11:13:08Z","updated_at":"2019-04-20T23:02:14Z","closed_at":"2019-04-20T23:02:14Z","author_association":"CONTRIBUTOR","body":"Presuming that [the workaround in  #1481](https://github.com/lukesampson/scoop-extras/issues/1481#issuecomment-443437042) has been followed, the file `scoop/apps/zeal/current/zeal.ini` should be hard-linked to the file `scoop/persist/zeal/zeal/ini`. That's fine, the way that the Scoop install process has been designed.\r\n\r\nUnfortunately, when Zeal updates its preferences, the way that it writes the settings file (ultimately using the `QSaveFile` functionality, which writes to a temporary file before moving the temporary file to the preferences file's location) breaks the hard-link that tied the two copies of the preferences file. This ends up with the preferences file in `scoop/apps/zeal/current/` retaining the preferences, while the file in `scoop/persist/zeal/` remains empty. This will work fine until zeal is updated, at which point the preferences file will be overwritten.\r\n\r\nI've verified this hypothesis by looking at the file-id of the two files:\r\n\r\n1. After installation, before the preferences are written, the file ids are the same:\r\n    ```\r\n    C:\\Users\\<me>\\scoop>fsutil file queryfileid apps\\zeal\\0.6.1\\zeal.ini\r\n    File ID is 0x000000000000000000470000000007d7\r\n\r\n    C:\\Users\\<me>\\scoop>fsutil file queryfileid persist\\zeal\\zeal.ini\r\n    File ID is 0x000000000000000000470000000007d7\r\n    ```\r\n\r\n2. After the preferences are written, the file ids are different, with the file in the `apps` directory changing:\r\n    ```\r\n    C:\\Users\\u404261\\scoop>fsutil file queryfileid apps\\zeal\\0.6.1\\zeal.ini\r\n    File ID is 0x0000000000000000000600000002e7ac\r\n\r\n    C:\\Users\\u404261\\scoop>fsutil file queryfileid persist\\zeal\\zeal.ini\r\n    File ID is 0x000000000000000000470000000007d7\r\n    ```\r\n"}}
{"actor":{"display_login":"rasa"}}