mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-11 02:06:40 +02:00
* Handle short lived files (Issue #273) * Update README.md * Add --disable-notifications to readme
This commit is contained in:
parent
cc6cbf5ac7
commit
0562c52492
|
@ -481,6 +481,7 @@ no option No sync and exit
|
|||
--create-directory Create a directory on OneDrive - no sync will be performed.
|
||||
--destination-directory Destination directory for renamed or move on OneDrive - no sync will be performed.
|
||||
--debug-https Debug OneDrive HTTPS communication.
|
||||
--disable-notifications Do not use desktop notifications in monitor mode.
|
||||
-d --download-only Only download remote changes
|
||||
--disable-upload-validation Disable upload validation when uploading to OneDrive
|
||||
--enable-logging Enable client activity to a separate log file
|
||||
|
|
|
@ -365,6 +365,12 @@ int main(string[] args)
|
|||
log.vlog("[M] Item deleted: ", path);
|
||||
try {
|
||||
sync.deleteByPath(path);
|
||||
} catch(SyncException e) {
|
||||
if (e.msg == "The item to delete is not in the local database") {
|
||||
log.vlog("Item cannot be deleted because not found in database");
|
||||
} else {
|
||||
log.logAndNotify(e.msg);
|
||||
}
|
||||
} catch(Exception e) {
|
||||
log.logAndNotify(e.msg);
|
||||
}
|
||||
|
|
|
@ -1177,6 +1177,12 @@ final class SyncEngine
|
|||
maxPathLength = 430;
|
||||
}
|
||||
|
||||
// A short lived file that has disappeared will cause an error - is the path valid?
|
||||
if (!exists(path)) {
|
||||
log.log("Skipping item - has disappeared: ", path);
|
||||
return;
|
||||
}
|
||||
|
||||
if(path.byGrapheme.walkLength < maxPathLength){
|
||||
// path is less than maxPathLength
|
||||
|
||||
|
|
Loading…
Reference in a new issue