pkolaczk / fclones

Efficient Duplicate File Finder
MIT License
1.84k stars 70 forks source link

Fix panic caused by path prefix on Windows #187

Closed pkolaczk closed 1 year ago

pkolaczk commented 1 year ago

Paths on Windows can have a multi-component root. E.g. C:\ is encoded as two components 'C:' and '\'. Unfortunately Path::root() and Path::strip_root() didn't account for that properly and stripped only the first component instead of stripping the whole root. That led to incorrect path processing in fclones move command and panic.

Fixes #185