Notifiarr / toolbarr

Starr Toolbarr
https://notifiarr.com/discord
MIT License
95 stars 4 forks source link

Fix invalid path updates #163

Closed davidnewhall closed 5 months ago

davidnewhall commented 5 months ago

Took me a while to figure out what was happening, but basically I was using path.Base() to strip off an item's parent directories. That doesn't work on paths with Windows back-slashes \. So any time we tried to update an item (movie, series) the original Windows path just had the new path prefixed to it.

The fix: Now we convert \ and / to whatever the native path separator is where Toolbarr is running. Then we can use filepath.Base() to get the last element in the path.