Regression Fix (#680)

* Ensure we mount the backups directory for Docker users

* Fixed a huge logic bug that deleted files in users libraries
This commit is contained in:
Joseph Milazzo 2021-10-16 11:24:30 -07:00 committed by GitHub
parent be3036665f
commit d5d03528d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 2 deletions

View File

@ -74,9 +74,12 @@ namespace API.Services.Tasks.Scanner
} }
// If we couldn't match, log. But don't log if the file parses as a cover image // If we couldn't match, log. But don't log if the file parses as a cover image
if (info == null || !(Parser.Parser.IsImage(path) || Parser.Parser.IsCoverImage(path))) if (info == null)
{ {
_logger.LogWarning("[Scanner] Could not parse series from {Path}", path); if (!(Parser.Parser.IsImage(path) && Parser.Parser.IsCoverImage(path)))
{
_logger.LogWarning("[Scanner] Could not parse series from {Path}", path);
}
return; return;
} }

View File

@ -60,6 +60,20 @@ else
ln -s /kavita/data/logs /kavita/logs ln -s /kavita/data/logs /kavita/logs
fi fi
if [ -d /kavita/data/backups ]
then
if [ -d /kavita/backups ]
then
unlink /kavita/backups
ln -s /kavita/data/backups /kavita/backups
else
ln -s /kavita/data/backups /kavita/backups
fi
else
mkdir /kavita/data/backups
ln -s /kavita/data/backups /kavita/backups
fi
if [ -d /kavita/data/stats ] if [ -d /kavita/data/stats ]
then then
if [ -d /kavita/stats ] if [ -d /kavita/stats ]