file_watchtower icon indicating copy to clipboard operation
file_watchtower copied to clipboard

fix: Windows paths handling

Open plu5 opened this issue 10 months ago • 0 comments

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.

plu5 avatar Apr 20 '24 19:04 plu5