Skip to content

Commit

Permalink
Revert "Fix logging output when handing downloaded new files (#1265)"
Browse files Browse the repository at this point in the history
This reverts commit 99a0f4b.
  • Loading branch information
abraunegg committed Feb 10, 2021
1 parent 99a0f4b commit 1bfd995
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions src/sync.d
Original file line number Diff line number Diff line change
Expand Up @@ -2973,11 +2973,7 @@ final class SyncEngine
}

// scan for changes in the path provided
if (isDir(logPath)) {
// if this path is a directory, output this message.
// if a file, potentially leads to confusion as to what the client is actually doing
log.vlog("Uploading differences of ", logPath);
}
log.vlog("Uploading differences of ", logPath);
Item item;
// For each unique OneDrive driveID we know about
foreach (driveId; driveIDsArray) {
Expand All @@ -2987,13 +2983,11 @@ final class SyncEngine
// There could be multiple shared folders all from this same driveId
foreach(dbItem; itemdb.selectByDriveId(driveId)) {
// Does it still exist on disk in the location the DB thinks it is
log.vdebug("Calling uploadDifferences(dbItem) as item is present in local cache DB");
uploadDifferences(dbItem);
}
} else {
if (itemdb.selectByPath(path, driveId, item)) {
// Does it still exist on disk in the location the DB thinks it is
log.vdebug("Calling uploadDifferences(item) as item is present in local cache DB");
uploadDifferences(item);
}
}
Expand Down Expand Up @@ -3094,13 +3088,7 @@ final class SyncEngine
logPath = path;
}

// scan for changes in the path provided
if (isDir(logPath)) {
// if this path is a directory, output this message.
// if a file, potentially leads to confusion as to what the client is actually doing
log.vlog("Uploading new items of ", logPath);
}

log.vlog("Uploading new items of ", logPath);
// Filesystem walk to find new files not uploaded
uploadNewItems(path);
}
Expand Down Expand Up @@ -3323,9 +3311,6 @@ final class SyncEngine
{
// Reset upload failure - OneDrive or filesystem issue (reading data)
uploadFailed = false;

// uploadFileDifferences is called when processing DB entries to compare against actual files on disk
string itemSource = "database";

assert(item.type == ItemType.file);
if (exists(path)) {
Expand All @@ -3340,14 +3325,12 @@ final class SyncEngine
localModifiedTime.fracSecs = Duration.zero;

if (localModifiedTime != itemModifiedTime) {
log.vlog("The file last modified time has changed");
log.vdebug("The local item has a different modified time ", localModifiedTime, " when compared to ", itemSource, " modified time ", itemModifiedTime);
log.vlog("The file last modified time has changed");
string eTag = item.eTag;

// perform file hash tests - has the content of the file changed?
if (!testFileHash(path, item)) {
log.vlog("The file content has changed");
log.vdebug("The local item has a different hash when compared to ", itemSource, " item hash");
write("Uploading modified file ", path, " ... ");
JSONValue response;

Expand Down

0 comments on commit 1bfd995

Please sign in to comment.