mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-22 15:46:36 +02:00
check if the item is in the db before executing operations on it
This commit is contained in:
parent
9cd00472b2
commit
849dd36276
|
@ -359,6 +359,8 @@ final class SyncEngine
|
||||||
{
|
{
|
||||||
log.vlog("Deleting files ...");
|
log.vlog("Deleting files ...");
|
||||||
foreach_reverse (i; idsToDelete) {
|
foreach_reverse (i; idsToDelete) {
|
||||||
|
Item item;
|
||||||
|
if (!itemdb.selectById(i[0], i[1], item)) continue; // check if the item is in the db
|
||||||
string path = itemdb.computePath(i[0], i[1]);
|
string path = itemdb.computePath(i[0], i[1]);
|
||||||
itemdb.deleteById(i[0], i[1]);
|
itemdb.deleteById(i[0], i[1]);
|
||||||
if (exists(path)) {
|
if (exists(path)) {
|
||||||
|
|
Loading…
Reference in a new issue