Update Fix 2211 and 2212 (#2214)

* Update fixes for 2211 and 2212 due to undesirable path issue and output when application processing is actually correct
This commit is contained in:
abraunegg 2022-11-10 13:43:36 +11:00 committed by GitHub
parent 812f1a8d31
commit 361c3cf0a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2462,6 +2462,9 @@ final class SyncEngine
}
}
}
// 'path' at this stage must not start with '/'
path = path.strip('/');
// skip downloading dot files if configured
if (cfg.getValueBool("skip_dotfiles")) {
@ -2624,23 +2627,9 @@ final class SyncEngine
// download an item that was not synced before
private void applyNewItem(const ref Item item, const(string) path)
{
bool localPathExists;
// Test for the local path existence
try {
// Does the path actually exist locally?
if (exists(path)) {
// flag that the path exists locally
localPathExists = true;
}
} catch (FileException e) {
// file system generated an error message
// display the error message
displayFileSystemErrorMessage(e.msg, getFunctionName!({}));
return;
}
if (localPathExists) {
// test if a bad symbolic link
// Test for the local path existence
if (exists(path)) {
// Issue #2209 fix - test if path is a bad symbolic link
if (isSymlink(path)) {
log.vdebug("Path on local disk is a symbolic link ........");
if (!exists(readLink(path))) {
@ -2651,7 +2640,7 @@ final class SyncEngine
}
}
// path exists locally
// path exists locally, is not a bad symbolic link
// Query DB for new remote item in specified path
string itemSource = "remote";
if (isItemSynced(item, path, itemSource)) {