mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-03 14:32:24 +02:00
Resolve client 'hang' when attempting to sync a Unix pipe file (#985)
* Resolve client 'hang' when attempting to sync a unix pipe file
This commit is contained in:
parent
48292a0858
commit
8c0d43183d
15
src/sync.d
15
src/sync.d
|
@ -3350,9 +3350,8 @@ final class SyncEngine
|
|||
return;
|
||||
}
|
||||
|
||||
// Is the path length is less than maxPathLength
|
||||
if(pathWalkLength < maxPathLength){
|
||||
// path length is less than maxPathLength
|
||||
|
||||
// skip dot files if configured
|
||||
if (cfg.getValueBool("skip_dotfiles")) {
|
||||
if (isDotFile(path)) {
|
||||
|
@ -3369,6 +3368,7 @@ final class SyncEngine
|
|||
}
|
||||
}
|
||||
|
||||
// Is the path a symbolic link
|
||||
if (isSymlink(path)) {
|
||||
// if config says so we skip all symlinked items
|
||||
if (cfg.getValueBool("skip_symlinks")) {
|
||||
|
@ -3452,6 +3452,7 @@ final class SyncEngine
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isFile(path)) {
|
||||
log.vdebug("Checking file: ", path);
|
||||
// The path that needs to be checked needs to include the '/'
|
||||
|
@ -3461,6 +3462,7 @@ final class SyncEngine
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (selectiveSync.isPathExcludedViaSyncList(path)) {
|
||||
if ((isFile(path)) && (cfg.getValueBool("sync_root_files")) && (rootName(path.strip('.').strip('/')) == "")) {
|
||||
log.vdebug("Not skipping path due to sync_root_files inclusion: ", path);
|
||||
|
@ -3517,6 +3519,11 @@ final class SyncEngine
|
|||
return;
|
||||
}
|
||||
} else {
|
||||
// path is not a directory, is it a valid file?
|
||||
// pipes - whilst technically valid files, are not valid for this client
|
||||
// prw-rw-r--. 1 user user 0 Jul 7 05:55 my_pipe
|
||||
if (isFile(path)) {
|
||||
// Path is a valid file
|
||||
bool fileFoundInDB = false;
|
||||
// This item is a file
|
||||
long fileSize = getSize(path);
|
||||
|
@ -3566,6 +3573,10 @@ final class SyncEngine
|
|||
// Not enough free space
|
||||
log.log("Skipping item '", path, "' due to insufficient free space available on OneDrive");
|
||||
}
|
||||
} else {
|
||||
// path is not a valid file
|
||||
log.log("Skipping item - item is not a valid file: ", path);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// This path was skipped - why?
|
||||
|
|
Loading…
Reference in a new issue