Handle renaming files to a name starting with a dot when skip_dotfile=true (#838)

* Handle renaming files to a name starting with a dot when skip_dotfiles = true

With thanks to @TheOnlyTrueJonathanHeard
This commit is contained in:
TheOnlyTrueJonathanHeard 2020-03-27 21:20:00 +01:00 committed by GitHub
parent e1c81861e8
commit 7170498a95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3673,6 +3673,11 @@ final class SyncEngine
// some other error
throw new SyncException("Can't move an item to an unsynced directory");
}
if (cfg.getValueBool("skip_dotfiles") && isDotFile(to)){
log.log("Removing item from OneDrive due to skip_dotfiles = true");
uploadDeleteItem(fromItem, from);
return;
}
if (fromItem.driveId != parentItem.driveId) {
// items cannot be moved between drives
uploadDeleteItem(fromItem, from);