mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-14 21:54:22 -06:00
Fixes sonarr cube again
This commit is contained in:
@@ -56,7 +56,7 @@ class TrackedFile:
|
|||||||
self.last_mtime = stat.st_mtime
|
self.last_mtime = stat.st_mtime
|
||||||
self.last_size = stat.st_size
|
self.last_size = stat.st_size
|
||||||
return True
|
return True
|
||||||
except (FileNotFoundError, PermissionError, OSError):
|
except OSError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def is_unchanged(self) -> bool:
|
def is_unchanged(self) -> bool:
|
||||||
@@ -67,7 +67,7 @@ class TrackedFile:
|
|||||||
try:
|
try:
|
||||||
stat = self.path.stat()
|
stat = self.path.stat()
|
||||||
return stat.st_mtime == self.last_mtime and stat.st_size == self.last_size
|
return stat.st_mtime == self.last_mtime and stat.st_size == self.last_size
|
||||||
except (FileNotFoundError, PermissionError, OSError):
|
except OSError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ class FileStabilityTracker:
|
|||||||
# Not a regular file (directory, symlink, etc.)
|
# Not a regular file (directory, symlink, etc.)
|
||||||
to_remove.append(path)
|
to_remove.append(path)
|
||||||
logger.debug(f"Path is not a regular file: {path}")
|
logger.debug(f"Path is not a regular file: {path}")
|
||||||
except (PermissionError, OSError) as e:
|
except OSError as e:
|
||||||
logger.warning(f"Cannot access {path}: {e}")
|
logger.warning(f"Cannot access {path}: {e}")
|
||||||
to_remove.append(path)
|
to_remove.append(path)
|
||||||
|
|
||||||
@@ -332,7 +332,7 @@ def _consume_file(
|
|||||||
if not filepath.is_file():
|
if not filepath.is_file():
|
||||||
logger.debug(f"Not consuming {filepath}: not a file or doesn't exist")
|
logger.debug(f"Not consuming {filepath}: not a file or doesn't exist")
|
||||||
return
|
return
|
||||||
except (PermissionError, OSError) as e:
|
except OSError as e:
|
||||||
logger.warning(f"Not consuming {filepath}: {e}")
|
logger.warning(f"Not consuming {filepath}: {e}")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user