Repository navigation
Fix some leaks in the linux folder watcher - #1120
Conversation
094fcda to
0d90121
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved critical path-lifetime and inotify event-handling issues remain.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Fixes Linux inotify event handling and folder-watcher cleanup.
Changes:
- Improves event parsing, buffering, and path handling.
- Cleans up ignored watches and recursive watch mappings.
- Normalizes paths and checks filesystem state.
| File | Description |
|---|---|
src/gui/folderwatcher_linux.cpp |
Updates inotify processing, path handling, and watch cleanup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if (fileName.startsWith(".sync_"_L1)) { | ||
| continue; |
There was a problem hiding this comment.
The old file names are no longer used.
e3d45b1 to
8fec76f
Compare
8fec76f to
a95dc96
Compare
| void FolderWatcherPrivate::inotifyRegisterPath(const QString &path) | ||
| { | ||
| if (path.isEmpty()) { | ||
| Q_ASSERT(false); |
There was a problem hiding this comment.
Hm, a Q_ASSERT(!path.isEmpty()); outside the if would be more meaningful to me
| Q_ASSERT(false); | ||
| return; | ||
| } | ||
| const auto folderPath = Utility::ensureTrailingSlash(path); |
There was a problem hiding this comment.
is that really needed? Called with an empty path, this results in root. It is caught here, but well... if somebody removes the isEmpty()- check in some day...
There was a problem hiding this comment.
If one day someone shoots themselves in the foot... the unit tests will capture it or maybe not.
Future problem.


No description provided.