Skip to content

Commit

Permalink
Fixed a bug with downloading volumes/series.
Browse files Browse the repository at this point in the history
  • Loading branch information
majora2007 committed Jan 12, 2024
1 parent 0070b7a commit 2480403
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions API/Services/ArchiveService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public string CreateZipFromFoldersForDownload(IList<string> files, string tempFo
{
var dateString = DateTime.UtcNow.ToShortDateString().Replace("/", "_");

var potentialExistingFile = _directoryService.FileSystem.FileInfo.New(Path.Join(_directoryService.TempDirectory, $"kavita_{tempFolder}_{dateString}.zip"));
var potentialExistingFile = _directoryService.FileSystem.FileInfo.New(Path.Join(_directoryService.TempDirectory, $"kavita_{tempFolder}_{dateString}.cbz"));
if (potentialExistingFile.Exists)
{
// A previous download exists, just return it immediately
Expand All @@ -352,7 +352,6 @@ public string CreateZipFromFoldersForDownload(IList<string> files, string tempFo
foreach (var path in files)
{
var tempPath = Path.Join(tempLocation, _directoryService.FileSystem.Path.GetFileNameWithoutExtension(_directoryService.FileSystem.FileInfo.New(path).Name));
_directoryService.ExistOrCreate(tempPath);
progressCallback(Tuple.Create(_directoryService.FileSystem.FileInfo.New(path).Name, (1.0f * totalFiles) / count));
ExtractArchive(path, tempPath);
count++;
Expand All @@ -363,7 +362,7 @@ public string CreateZipFromFoldersForDownload(IList<string> files, string tempFo
throw new KavitaException("bad-copy-files-for-download");
}

var zipPath = Path.Join(_directoryService.TempDirectory, $"kavita_{tempFolder}_{dateString}.zip");
var zipPath = Path.Join(_directoryService.TempDirectory, $"kavita_{tempFolder}_{dateString}.cbz");
try
{
ZipFile.CreateFromDirectory(tempLocation, zipPath);
Expand Down
4 changes: 2 additions & 2 deletions UI/Web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"name": "GPL-3.0",
"url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE"
},
"version": "0.7.12.1"
"version": "0.7.12.2"
},
"servers": [
{
Expand Down

0 comments on commit 2480403

Please sign in to comment.