fix(folderman): disconnect slotFolderCanSyncChanged when unloading folder.#9813
fix(folderman): disconnect slotFolderCanSyncChanged when unloading folder.#9813
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR fixes stale signal connections when unloading a folder by disconnecting Folder::canSyncChanged from FolderMan, and refactors related path registration/unregistration logic for readability.
Changes:
- Disconnect
Folder::canSyncChangedwhen unloading a folder to avoid callbacks after unload. - Refactor
slotFolderCanSyncChanged()local variable naming/const usage. - Refactor
SocketApi::slotUnregisterPath()control flow and message building.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/gui/socketapi/socketapi.cpp | Refactors unregister-path logic and message broadcast call. |
| src/gui/folderman.cpp | Disconnects canSyncChanged on unload; minor refactor in slotFolderCanSyncChanged(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f79fe21 to
bfc72c3
Compare
f30ead7 to
196e6b7
Compare
|
/backport to stable-33.0 |
|
/backport to stable-4.0 |
…lder. In case the account state changes during shutdown, the folder might not exist anymore. Signed-off-by: Camila Ayres <hello@camilasan.com>
Signed-off-by: Camila Ayres <hello@camilasan.com>
…Path. Passing doWait=true caused socket->waitForBytesWritten(1000) to emit a signal. During shutdown, the signal could trigger slotUnregisterPath, corrupting _registeredAliases and crashing with EXC_BAD_ACCESS. Removing doWait eliminates the nested event loop and the re-entrancy. Signed-off-by: Camila Ayres <hello@camilasan.com>
Signed-off-by: Camila Ayres <hello@camilasan.com>
Signed-off-by: Camila Ayres <hello@camilasan.com>
196e6b7 to
1a0bd15
Compare
|
Artifact containing the AppImage: nextcloud-appimage-pr-9813.zip Digest: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
|




Attempt to fix crash when exiting the client (on a computer reboot):
Passing doWait=true caused socket->waitForBytesWritten(1000) to emit a signal.
During shutdown, the signal could trigger slotUnregisterPath,
corrupting _registeredAliases and crashing with EXC_BAD_ACCESS.
Removing doWait eliminates the nested event loop and the re-entrancy.
ℹ️ 🤖 I did use Claude to analyse why the crash might be happening.