Selaa lähdekoodia

core: test for IN_MOVED_FROM too

Daniele Bartolini 2 vuotta sitten
vanhempi
sitoutus
ede8fe94b2
2 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 4 0
      docs/changelog.rst
  2. 1 1
      src/core/filesystem/file_monitor_linux.cpp

+ 4 - 0
docs/changelog.rst

@@ -4,6 +4,10 @@ Changelog
 0.49.0 --- DD MMM YYYY
 ----------------------
 
+**Data Compiler**
+
+* Linux: fixed detection of deleted directories in some cases.
+
 **Runtime**
 
 * Fixed a crash when rendering text with a font missing some of the glyphs.

+ 1 - 1
src/core/filesystem/file_monitor_linux.cpp

@@ -294,7 +294,7 @@ struct FileMonitorImpl
 			// Unpaired IN_MOVED_TO or IN_MOVE_FROM with missing IN_MOVED_TO (rename from outside
 			// watched directory).
 			if (cookie != 0) {
-				if (cookie_mask & IN_MOVED_TO) {
+				if (cookie_mask & IN_MOVED_TO || cookie_mask & IN_MOVED_FROM) {
 					_function(_user_data
 						, FileMonitorEvent::DELETED
 						, cookie_mask & IN_ISDIR