Skip to content

Commit

Permalink
Fix: Error extracting files with 7zip if the file name contained UTF8…
Browse files Browse the repository at this point in the history
… characters
  • Loading branch information
ollm authored May 18, 2024
1 parent e12383a commit 27c863b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Don't show drag menu if the event comes from the app [`383f9fe`](https://github.com/ollm/OpenComic/commit/383f9fe30d535260e6f6091242289d99ac4d755b)
- PDF zoom not work if device pixel ratio is upper 1 [`d318cfc`](https://github.com/ollm/OpenComic/commit/d318cfc071b5e8d919b4c8acef89b85e8ef40cc8)
- Optimized index loading and folder navigation [`0e6000f`](https://github.com/ollm/OpenComic/commit/0e6000f00e445de98eab7cdfbf72ee9b0016bf26)

- Error extracting files with 7zip if the file name contained UTF8 characters

## [v1.2.0](https://github.com/ollm/OpenComic/releases/tag/v1.2.0) (29-03-2024)

Expand Down
6 changes: 3 additions & 3 deletions scripts/file-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1854,9 +1854,9 @@ var fileCompressed = function(path, _realPath = false, forceType = false, prefix
this.macosStartAccessingSecurityScopedResource(this.realPath);

if(extract)
this._7z = un7z.extractFull(this.realPath, this.tmp, {$bin: bin7z, $progress: true, $cherryPick: only});
this._7z = un7z.extractFull(this.realPath, this.tmp, {$bin: bin7z, $progress: true, $cherryPick: only, charset: 'UTF-8', listFileCharset: 'UTF-8'});
else
this._7z = un7z.list(this.realPath, {$bin: bin7z});
this._7z = un7z.list(this.realPath, {$bin: bin7z, charset: 'UTF-8', listFileCharset: 'UTF-8'});

return this._7z;

Expand Down Expand Up @@ -1947,7 +1947,7 @@ var fileCompressed = function(path, _realPath = false, forceType = false, prefix

_this.setProgress(1);

console.log('extract7z end:'+_this.path);
console.log('extract7z end: '+_this.path);

resolve();

Expand Down

0 comments on commit 27c863b

Please sign in to comment.