mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-19 22:25:03 +02:00
Fix segfault when moving folder outside the sync directory when using --monitor (#957)
Fix segfault when moving folder outside the sync directory when using --monitor on Arch Linux
This commit is contained in:
parent
6fcc5f8196
commit
9e020f05cc
|
@ -231,8 +231,6 @@ final class Monitor
|
||||||
while (i < length) {
|
while (i < length) {
|
||||||
inotify_event *event = cast(inotify_event*) &buffer[i];
|
inotify_event *event = cast(inotify_event*) &buffer[i];
|
||||||
string path;
|
string path;
|
||||||
path = getPath(event);
|
|
||||||
|
|
||||||
// inotify event debug
|
// inotify event debug
|
||||||
log.vdebug("inotify event wd: ", event.wd);
|
log.vdebug("inotify event wd: ", event.wd);
|
||||||
log.vdebug("inotify event mask: ", event.mask);
|
log.vdebug("inotify event mask: ", event.mask);
|
||||||
|
@ -272,6 +270,9 @@ final class Monitor
|
||||||
throw new MonitorException("Inotify overflow, events missing");
|
throw new MonitorException("Inotify overflow, events missing");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if the event is not to be ignored, obtain path
|
||||||
|
path = getPath(event);
|
||||||
|
|
||||||
// skip events that should be excluded based on application configuration
|
// skip events that should be excluded based on application configuration
|
||||||
if (selectiveSync.isDirNameExcluded(path.strip('.').strip('/'))) {
|
if (selectiveSync.isDirNameExcluded(path.strip('.').strip('/'))) {
|
||||||
goto skip;
|
goto skip;
|
||||||
|
|
Loading…
Reference in a new issue