oniony / TMSU

TMSU lets you tags your files and then access them through a nifty virtual filesystem from any other application.
Other
2k stars 115 forks source link

Incorrect handling of absolute paths for Windows #205

Open ipkiss42 opened 3 years ago

ipkiss42 commented 3 years ago

A couple of DB queries (example 1, example 2) use /% to match absolute paths. This doesn't work properly for Windows paths.

Since the absolute-ness of paths is easy to get from code, I suggest a new is_absolute column in the file table to keep track of it and allow easy querying. I suppose it could be back-filled using /% (or whatever smarter absolute path detection can be done in SQL).

Note: I'm not sure if Windows is supposed to be supported, but since the release notes for version 0.5.0 mention "rudimentary" support (i.e. without VFS) and since this is not related to VFS, it might be worth tracking it.

oniony commented 3 years ago

Windows support was something I always had in my mind to do properly. But as I use Windows so little now at home, it's not on my priority list.