mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-04 15:02:25 +02:00
exit early if the item is to be deleted
This commit is contained in:
parent
1260fcfcc1
commit
957b034805
13
src/sync.d
13
src/sync.d
|
@ -167,6 +167,13 @@ final class SyncEngine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if the item is to be deleted
|
||||||
|
if (isItemDeleted(item)) {
|
||||||
|
log.vlog("The item is marked for deletion");
|
||||||
|
if (cached) idsToDelete ~= id;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// compute the path of the item
|
// compute the path of the item
|
||||||
string path = ".";
|
string path = ".";
|
||||||
if (parentId) {
|
if (parentId) {
|
||||||
|
@ -174,11 +181,7 @@ final class SyncEngine
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemType type;
|
ItemType type;
|
||||||
if (isItemDeleted(item)) {
|
if (isItemFile(item)) {
|
||||||
log.vlog("The item is marked for deletion");
|
|
||||||
if (cached) idsToDelete ~= id;
|
|
||||||
return;
|
|
||||||
} else if (isItemFile(item)) {
|
|
||||||
type = ItemType.file;
|
type = ItemType.file;
|
||||||
if (!path.matchFirst(skipFile).empty) {
|
if (!path.matchFirst(skipFile).empty) {
|
||||||
log.vlog("Filtered out");
|
log.vlog("Filtered out");
|
||||||
|
|
Loading…
Reference in a new issue