Skip to content

Commit

Permalink
fix: don't clean up VFS if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Oct 11, 2024
1 parent e163f99 commit b0cc8d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Shokofin/Resolvers/VirtualFileSystemService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,12 @@ private List<string> FindSubtitlesForPath(string sourcePath)

private LinkGenerationResult CleanupStructure(string vfsPath, string directoryToClean, IReadOnlyList<string> allKnownPaths, bool preview = false)
{
if (!FileSystem.DirectoryExists(directoryToClean)) {
if (!preview)
Logger.LogDebug("Skipped cleaning up folder because it does not exist: {Path}", directoryToClean);
return new();
}

if (!preview)
Logger.LogDebug("Looking for files to remove in folder at {Path}", directoryToClean);
var start = DateTime.Now;
Expand Down

0 comments on commit b0cc8d4

Please sign in to comment.