mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 01:16:18 -05:00
Allowing refresh of directory which does not exist (it was deleted).
This commit is contained in:
parent
b40db1a1b1
commit
45e6bf859f
1 changed files with 1 additions and 1 deletions
|
|
@ -377,7 +377,7 @@ async def refresh_directory_files_recursively(directory: Union[pathlib.Path, str
|
|||
Any records of the files that are no longer in the directory will be removed."""
|
||||
if isinstance(directory, str):
|
||||
directory = pathlib.Path(directory)
|
||||
if not directory.is_dir():
|
||||
if directory.is_file():
|
||||
raise ValueError(f'Cannot refresh files of a file: {directory=}')
|
||||
|
||||
# All Files older than this will be removed.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue