mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-22 22:15:17 -04:00
Improve HTTP file mappers
(cherry picked from commit f30207c3d130c1a37f29e214101c8ec9613d18ee)
This commit is contained in:
@@ -15,11 +15,13 @@ namespace Radarr.Http.Frontend.Mappers
|
||||
_backupService = backupService;
|
||||
}
|
||||
|
||||
public override string Map(string resourceUrl)
|
||||
protected override string FolderPath => _backupService.GetBackupFolder();
|
||||
|
||||
protected override string MapPath(string resourceUrl)
|
||||
{
|
||||
var path = resourceUrl.Replace("/backup/", "").Replace('/', Path.DirectorySeparatorChar);
|
||||
|
||||
return Path.Combine(_backupService.GetBackupFolder(), path);
|
||||
return Path.Combine(FolderPath, path);
|
||||
}
|
||||
|
||||
public override bool CanHandle(string resourceUrl)
|
||||
|
||||
Reference in New Issue
Block a user