file_watchtower
file_watchtower copied to clipboard
fix: Windows paths handling
On Windows, pathlib paths are of type WindowsPath
, so do not pass type(path) is PosixPath
checks. Check instead for the parent class Path
, so that both PosixPath
and WindowsPath
get correctly handled.
This caused sqlite queries in db.py
functions to fail with:
sqlite3.InterfaceError: Error binding parameter 1 - probably unsupported type.
because instead of str
, WindowsPath
was being passed as the file_path
parameter.