Handle renaming dotfiles to another dotfile when skip_dotfile=true in monitor mode (#843)

* Handle renaming dotfiles to another dotfile when skip_dotfile=true in monitor mode

With thanks to @TheOnlyTrueJonathanHeard
This commit is contained in:
TheOnlyTrueJonathanHeard 2020-03-28 21:08:01 +01:00 committed by GitHub
parent caf51886cf
commit 3708828806
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3644,8 +3644,13 @@ final class SyncEngine
log.log("Moving ", from, " to ", to);
Item fromItem, toItem, parentItem;
if (!itemdb.selectByPath(from, defaultDriveId, fromItem)) {
uploadNewFile(to);
return;
if (cfg.getValueBool("skip_dotfiles") && isDotFile(to)){
log.log("Skipping upload due to skip_dotfile = true");
return;
} else {
uploadNewFile(to);
return;
}
}
if (fromItem.parentId == null) {
// the item is a remote folder, need to do the operation on the parent