mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-01 21:52:50 +02:00
Fix onedrive not syncing "hidden" directories
* Fix the handling of hidden filenames & directories (.hello, .git etc) so that these are uploaded / downloaded without issue. * Add verbose logging for uploaded files as to why they were skipped
This commit is contained in:
parent
5e0e763317
commit
570d42269e
|
@ -29,7 +29,14 @@ final class SelectiveSync
|
|||
|
||||
bool isNameExcluded(string name)
|
||||
{
|
||||
return !name.matchFirst(mask).empty;
|
||||
auto validName = isValidFilename(name);
|
||||
if (validName){
|
||||
// This is a valid filename - do NOT exclude
|
||||
return false;
|
||||
} else {
|
||||
// Invalid file name - exclude this name
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool isPathExcluded(string path)
|
||||
|
|
|
@ -715,15 +715,18 @@ final class SyncEngine
|
|||
|
||||
// skip unexisting symbolic links
|
||||
if (isSymlink(path) && !exists(readLink(path))) {
|
||||
log.vlog("Skipping item - symbolic link: ", path);
|
||||
return;
|
||||
}
|
||||
|
||||
// skip filtered items
|
||||
if (path != ".") {
|
||||
if (selectiveSync.isNameExcluded(baseName(path))) {
|
||||
log.vlog("Skipping item - invalid name: ", path);
|
||||
return;
|
||||
}
|
||||
if (selectiveSync.isPathExcluded(path)) {
|
||||
log.vlog("Skipping item - path excluded: ", path);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue