mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
static resource URLs are now case sensitive.
This commit is contained in:
parent
e89a35522e
commit
478caf15f8
16 changed files with 127 additions and 84 deletions
|
@ -14,8 +14,10 @@ namespace NzbDrone.Common
|
|||
DateTime GetLastFolderWrite(string path);
|
||||
DateTime GetLastFileWrite(string path);
|
||||
void EnsureFolder(string path);
|
||||
bool FolderExists(string path, bool caseSensitive);
|
||||
bool FolderExists(string path);
|
||||
bool FileExists(string path);
|
||||
bool FileExists(string path, bool caseSensitive);
|
||||
string[] GetDirectories(string path);
|
||||
string[] GetFiles(string path, SearchOption searchOption);
|
||||
long GetFolderSize(string path);
|
||||
|
@ -97,17 +99,36 @@ namespace NzbDrone.Common
|
|||
public virtual bool FolderExists(string path)
|
||||
{
|
||||
Ensure.That(() => path).IsValidPath();
|
||||
|
||||
return Directory.Exists(path);
|
||||
}
|
||||
|
||||
public virtual bool FolderExists(string path, bool caseSensitive)
|
||||
{
|
||||
if (caseSensitive)
|
||||
{
|
||||
return FolderExists(path) && path == path.GetActualCasing();
|
||||
}
|
||||
|
||||
return FolderExists(path);
|
||||
}
|
||||
|
||||
|
||||
public virtual bool FileExists(string path)
|
||||
{
|
||||
Ensure.That(() => path).IsValidPath();
|
||||
|
||||
return File.Exists(path);
|
||||
}
|
||||
|
||||
public virtual bool FileExists(string path, bool caseSensitive)
|
||||
{
|
||||
if (caseSensitive)
|
||||
{
|
||||
return FileExists(path) && path == path.GetActualCasing();
|
||||
}
|
||||
|
||||
return FileExists(path);
|
||||
}
|
||||
|
||||
public virtual string[] GetDirectories(string path)
|
||||
{
|
||||
Ensure.That(() => path).IsValidPath();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue