handled leading slash

This commit is contained in:
Pagwin 2026-02-23 21:59:20 -05:00
parent c447aab1b9
commit 4eaa44b4f1
No known key found for this signature in database
GPG key ID: 81137023740CA260

View file

@ -31,7 +31,7 @@ res_path_handle :: String -> T.Text
res_path_handle = T.pack . yeetTop res_path_handle = T.pack . yeetTop
yeetTop :: FilePath -> FilePath yeetTop :: FilePath -> FilePath
yeetTop path = new_dir </> filename yeetTop path = '/' : new_dir </> filename
where where
new_dir = concat $ drop 1 $ FP.splitPath $ FP.takeDirectory path new_dir = concat $ drop 1 $ FP.splitPath $ FP.takeDirectory path
filename = FP.takeFileName path filename = FP.takeFileName path