Download Bugfix (#2601)

This commit is contained in:
Joe Milazzo 2024-01-11 18:59:29 -06:00 committed by GitHub
parent e215305700
commit 51e169ed82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 12 deletions

View File

@ -335,7 +335,7 @@ public class ArchiveService : IArchiveService
{ {
var dateString = DateTime.UtcNow.ToShortDateString().Replace("/", "_"); 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) if (potentialExistingFile.Exists)
{ {
// A previous download exists, just return it immediately // A previous download exists, just return it immediately
@ -352,7 +352,6 @@ public class ArchiveService : IArchiveService
foreach (var path in files) foreach (var path in files)
{ {
var tempPath = Path.Join(tempLocation, _directoryService.FileSystem.Path.GetFileNameWithoutExtension(_directoryService.FileSystem.FileInfo.New(path).Name)); 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)); progressCallback(Tuple.Create(_directoryService.FileSystem.FileInfo.New(path).Name, (1.0f * totalFiles) / count));
ExtractArchive(path, tempPath); ExtractArchive(path, tempPath);
count++; count++;
@ -363,7 +362,7 @@ public class ArchiveService : IArchiveService
throw new KavitaException("bad-copy-files-for-download"); 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 try
{ {
ZipFile.CreateFromDirectory(tempLocation, zipPath); ZipFile.CreateFromDirectory(tempLocation, zipPath);

View File

@ -1,12 +1,12 @@
{ {
"name": "kavita-webui", "name": "kavita-webui",
"version": "0.4.2", "version": "0.7.12.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "kavita-webui", "name": "kavita-webui",
"version": "0.4.2", "version": "0.7.12.1",
"dependencies": { "dependencies": {
"@angular/animations": "^17.0.8", "@angular/animations": "^17.0.8",
"@angular/cdk": "^17.0.4", "@angular/cdk": "^17.0.4",

View File

@ -14,12 +14,7 @@
<div class="mb-2"> <div class="mb-2">
<label for="password" class="form-label visually-hidden">{{t('password')}}</label> <label for="password" class="form-label visually-hidden">{{t('password')}}</label>
<input class="form-control custom-input" formControlName="password" name="password" <input class="form-control custom-input" formControlName="password" name="password"
id="password" type="password" pattern="^.{6,32}$" [placeholder]="t('password')"> id="password" type="password" [placeholder]="t('password')">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="loginForm.get('password')?.errors?.pattern" >
<div class="" *ngIf="loginForm.get('password')?.errors?.pattern">
{{t('password-validation')}}
</div>
</div>
</div> </div>
<div class="mb-3"> <div class="mb-3">

View File

@ -7,7 +7,7 @@
"name": "GPL-3.0", "name": "GPL-3.0",
"url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE" "url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE"
}, },
"version": "0.7.12.1" "version": "0.7.12.2"
}, },
"servers": [ "servers": [
{ {