fix: harden getStoragePath and keep CRLF endings

- Normalize the returned path to forward slashes so it matches what
  Storage.list() (glob) returns, instead of leaking `\` on Windows.
- Treat the storage root itself as "not inside", so passing a directory
  no longer yields an empty path that Storage.load() would open as a dir.
- Extract the containment check into isInsideDirectory() and drop the
  redundant isAbsolute(filepath) branch (path.resolve already handles it).
- Restore the repository's CRLF line endings in the nested fixture.
This commit is contained in:
Sanaei committed 2026-09-04 17:47:43 +02:00
1 parent 2336dbc41f
commit f527cfd03a
2 files changed
+22 -17

No files matched your search

@@ -1,5 +1,5 @@
#EXTM3U
#EXTINF:-1 tvg-id="",Zulu (720p)
https://example.com/zulu.m3u8
#EXTINF:-1 tvg-id="",Alpha (720p)
https://example.com/alpha.m3u8
#EXTM3U
#EXTINF:-1 tvg-id="",Zulu (720p)
https://example.com/zulu.m3u8
#EXTINF:-1 tvg-id="",Alpha (720p)
https://example.com/alpha.m3u8