mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-23 16:12:12 +02:00
Only calculate path with computeItemPath if path is empty (#2212)
* Only calculate path with computeItemPath if path is empty, avoiding a double calculation and DB operations
This commit is contained in:
parent
c73c0aa608
commit
4a6c78a7a6
|
@ -2406,7 +2406,10 @@ final class SyncEngine
|
||||||
// Is the item parent in the local database?
|
// Is the item parent in the local database?
|
||||||
if (itemdb.idInLocalDatabase(item.driveId, item.parentId)){
|
if (itemdb.idInLocalDatabase(item.driveId, item.parentId)){
|
||||||
// compute the item path to see if the path is excluded & need the full path for this file
|
// compute the item path to see if the path is excluded & need the full path for this file
|
||||||
path = computeItemPath(item.driveId, item.parentId) ~ "/" ~ item.name;
|
log.vdebug("sync_list item to check: ", path);
|
||||||
|
if (path.empty) {
|
||||||
|
path = computeItemPath(item.driveId, item.parentId) ~ "/" ~ item.name;
|
||||||
|
}
|
||||||
path = buildNormalizedPath(path);
|
path = buildNormalizedPath(path);
|
||||||
if (selectiveSync.isPathExcludedViaSyncList(path)) {
|
if (selectiveSync.isPathExcludedViaSyncList(path)) {
|
||||||
// selective sync advised to skip, however is this a file and are we configured to upload / download files in the root?
|
// selective sync advised to skip, however is this a file and are we configured to upload / download files in the root?
|
||||||
|
|
Loading…
Reference in a new issue