Skip to content

Commit

Permalink
Update inotify logging output for deletion events
Browse files Browse the repository at this point in the history
* Update inotify logging output for deletion events to include the path that is being attempted to be deleted, to allow for easier event analysis of what is going on
  • Loading branch information
abraunegg committed Dec 12, 2024
1 parent 7741684 commit a633f29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.d
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,9 @@ int main(string[] cliArgs) {
filesystemMonitor.onDelete = delegate(string path) {
if (verboseLogging) {addLogEntry("[M] Local item deleted: " ~ path, ["verbose"]);}
try {
addLogEntry("The operating system sent a deletion notification. Trying to delete the item as requested");
// The path has been deleted .. we cannot use isDir or isFile to advise what was deleted. This is the best we can Do
addLogEntry("The operating system sent a deletion notification. Trying to delete this item as requested: " ~ path);
// perform the delete action
syncEngineInstance.deleteByPath(path);
} catch (CurlException e) {
if (verboseLogging) {addLogEntry("Offline, cannot delete item: " ~ path, ["verbose"]);}
Expand Down

0 comments on commit a633f29

Please sign in to comment.