mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Allow capitalising change on virtual folders
This commit is contained in:
parent
2f47265c4f
commit
7b3edb8737
@ -77,9 +77,12 @@ namespace MediaBrowser.Api.Library
|
|||||||
|
|
||||||
if (!string.Equals(currentPath, newPath, StringComparison.OrdinalIgnoreCase) && Directory.Exists(newPath))
|
if (!string.Equals(currentPath, newPath, StringComparison.OrdinalIgnoreCase) && Directory.Exists(newPath))
|
||||||
{
|
{
|
||||||
throw new ArgumentException("There is already a media collection with the name " + newPath + ".");
|
//Create an unique name
|
||||||
|
var temporaryName = Guid.NewGuid().ToString();
|
||||||
|
var temporaryPath = Path.Combine(rootFolderPath, temporaryName);
|
||||||
|
Directory.Move(currentPath,temporaryPath);
|
||||||
|
currentPath = temporaryPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
Directory.Move(currentPath, newPath);
|
Directory.Move(currentPath, newPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user