Skip to content

Commit b1c7aef

Browse files
authored
Fix: Some compressed files wouldn't open from the servers
1 parent b8da673 commit b1c7aef

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2525
- Show magnifying glass instantaneous when enabled from shortcuts [`43bc73d`](https://github.com/ollm/OpenComic/commit/43bc73dcf85d80e756f1b674a64c66c7ce75529c)
2626
- goBack not working if OpenComic starts directly on reading [`2f6e2fc`](https://github.com/ollm/OpenComic/commit/2f6e2fc0ccb6d6d22eaa2c543a87d3a8b91bfc46)
2727
- Error on migrating some config [`3b4e1ce`](https://github.com/ollm/OpenComic/commit/3b4e1ceb8c167bb76a7355a4085a09e2173c520d)
28-
- Server connections do not work in some cases on Windows
28+
- Server connections do not work in some cases on Windows [`65ecdf6`](https://github.com/ollm/OpenComic/commit/65ecdf6e5ef94170cce3ebcf0062fd2b3ebac2fe)
29+
- Some compressed files wouldn't open from the servers
2930

3031
## [v1.6.0](https://github.com/ollm/OpenComic/releases/tag/v1.6.0) (27-07-2025)
3132

‎scripts/file-manager.js‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3118,6 +3118,9 @@ function splitPath(path)
31183118

31193119
function isParentPath(parentPath, fullPath)
31203120
{
3121+
parentPath = serverClient.fixPath(parentPath);
3122+
fullPath = serverClient.fixPath(fullPath);
3123+
31213124
parentPath = parentPath.endsWith(p.sep) ? parentPath : parentPath + p.sep;
31223125
fullPath = fullPath.endsWith(p.sep) ? fullPath : fullPath + p.sep;
31233126

@@ -3126,8 +3129,11 @@ function isParentPath(parentPath, fullPath)
31263129

31273130
function removePathPart(path, partToRemove)
31283131
{
3129-
path = path.replace(new RegExp('^\s*'+pregQuote(partToRemove)), '');
3130-
path = path.replace(new RegExp('^\s*'+pregQuote(p.sep)), '');
3132+
path = serverClient.fixPath(path);
3133+
partToRemove = serverClient.fixPath(partToRemove);
3134+
3135+
path = path.startsWith(partToRemove) ? path.slice(partToRemove.length) : path;
3136+
path = path.startsWith(p.sep) ? path.slice(p.sep.length) : path;
31313137

31323138
return path;
31333139
}

0 commit comments

Comments
 (0)