mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
upgrade service only tries to delete existing file if it actually exists.
This commit is contained in:
parent
c3b25878d4
commit
c57fb29db4
3 changed files with 51 additions and 6 deletions
|
@ -33,14 +33,14 @@ namespace NzbDrone.Core.MediaFiles
|
|||
|
||||
public void DeleteFolder(string path)
|
||||
{
|
||||
logger.Trace("Attempting to send '{0}' to recycling bin", path);
|
||||
logger.Info("Attempting to send '{0}' to recycling bin", path);
|
||||
var recyclingBin = _configService.RecycleBin;
|
||||
|
||||
if (String.IsNullOrWhiteSpace(recyclingBin))
|
||||
{
|
||||
logger.Info("Recycling Bin has not been configured, deleting permanently.");
|
||||
_diskProvider.DeleteFolder(path, true);
|
||||
logger.Trace("Folder has been permanently deleted: {0}", path);
|
||||
logger.Debug("Folder has been permanently deleted: {0}", path);
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -57,13 +57,13 @@ namespace NzbDrone.Core.MediaFiles
|
|||
_diskProvider.FileSetLastWriteTimeUtc(file, DateTime.UtcNow);
|
||||
}
|
||||
|
||||
logger.Trace("Folder has been moved to the recycling bin: {0}", destination);
|
||||
logger.Debug("Folder has been moved to the recycling bin: {0}", destination);
|
||||
}
|
||||
}
|
||||
|
||||
public void DeleteFile(string path)
|
||||
{
|
||||
logger.Trace("Attempting to send '{0}' to recycling bin", path);
|
||||
logger.Debug("Attempting to send '{0}' to recycling bin", path);
|
||||
var recyclingBin = _configService.RecycleBin;
|
||||
|
||||
if (String.IsNullOrWhiteSpace(recyclingBin))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue