mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-08 08:52:15 +02:00
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:
parent
812f1a8d31
commit
361c3cf0a1
21
src/sync.d
21
src/sync.d
|
@ -2463,6 +2463,9 @@ final class SyncEngine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 'path' at this stage must not start with '/'
|
||||||
|
path = path.strip('/');
|
||||||
|
|
||||||
// skip downloading dot files if configured
|
// skip downloading dot files if configured
|
||||||
if (cfg.getValueBool("skip_dotfiles")) {
|
if (cfg.getValueBool("skip_dotfiles")) {
|
||||||
if (isDotFile(path)) {
|
if (isDotFile(path)) {
|
||||||
|
@ -2624,23 +2627,9 @@ final class SyncEngine
|
||||||
// download an item that was not synced before
|
// download an item that was not synced before
|
||||||
private void applyNewItem(const ref Item item, const(string) path)
|
private void applyNewItem(const ref Item item, const(string) path)
|
||||||
{
|
{
|
||||||
bool localPathExists;
|
|
||||||
// Test for the local path existence
|
// Test for the local path existence
|
||||||
try {
|
|
||||||
// Does the path actually exist locally?
|
|
||||||
if (exists(path)) {
|
if (exists(path)) {
|
||||||
// flag that the path exists locally
|
// Issue #2209 fix - test if path is a bad symbolic link
|
||||||
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
|
|
||||||
if (isSymlink(path)) {
|
if (isSymlink(path)) {
|
||||||
log.vdebug("Path on local disk is a symbolic link ........");
|
log.vdebug("Path on local disk is a symbolic link ........");
|
||||||
if (!exists(readLink(path))) {
|
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
|
// Query DB for new remote item in specified path
|
||||||
string itemSource = "remote";
|
string itemSource = "remote";
|
||||||
if (isItemSynced(item, path, itemSource)) {
|
if (isItemSynced(item, path, itemSource)) {
|
||||||
|
|
Loading…
Reference in a new issue