johman10 / flood-for-transmission

A Flood (https://github.com/Flood-UI/flood) clone for Transmission
GNU General Public License v3.0
353 stars 33 forks source link

Destination must be an absolute path on windows #551

Closed xiaobai-sci closed 10 months ago

xiaobai-sci commented 10 months ago

image I saw that you mentioned the problem has been resolved earlier. However, I downloaded the latest version, and the error still persists.

iRaschen commented 10 months ago

check the beginning of the path for a space "[space]D:\Jellyfin\TV"

johman10 commented 10 months ago

It's not a space actually, it's just the padding of the field you're seeing.

It seems like the validation is a bit too strict an only allowing paths that start with a / because Linux. The validation is specified here: https://github.com/johman10/flood-for-transmission/blob/master/src/components/Modal/Location/Location.svelte#L62

I seem to have changed it in one place but not all of them: https://github.com/johman10/flood-for-transmission/blob/master/src/components/Modal/Add/Add.svelte#L150.

The other place the validation is used but wrong is here: https://github.com/johman10/flood-for-transmission/blob/master/src/components/Modal/Settings/UserInterface.svelte#L99.

I think this pattern regex should live more centrally and be loaded into the componets where it's needed instead of hardcoded. I can create a PR for this now.