mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-31 20:24:21 -04:00
Remove obsolete network path code
This commit is contained in:
parent
09c05ff9fa
commit
b53bf2cd16
@ -3011,21 +3011,6 @@ namespace Emby.Server.Implementations.Library
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool ValidateNetworkPath(string path)
|
|
||||||
{
|
|
||||||
// if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
|
||||||
//{
|
|
||||||
// // We can't validate protocol-based paths, so just allow them
|
|
||||||
// if (path.IndexOf("://", StringComparison.OrdinalIgnoreCase) == -1)
|
|
||||||
// {
|
|
||||||
// return Directory.Exists(path);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
// Without native support for unc, we cannot validate this when running under mono
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private const string ShortcutFileExtension = ".mblink";
|
private const string ShortcutFileExtension = ".mblink";
|
||||||
|
|
||||||
public void AddMediaPath(string virtualFolderName, MediaPathInfo pathInfo)
|
public void AddMediaPath(string virtualFolderName, MediaPathInfo pathInfo)
|
||||||
@ -3052,11 +3037,6 @@ namespace Emby.Server.Implementations.Library
|
|||||||
throw new FileNotFoundException("The path does not exist.");
|
throw new FileNotFoundException("The path does not exist.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(pathInfo.NetworkPath) && !ValidateNetworkPath(pathInfo.NetworkPath))
|
|
||||||
{
|
|
||||||
throw new FileNotFoundException("The network path does not exist.");
|
|
||||||
}
|
|
||||||
|
|
||||||
var rootFolderPath = _configurationManager.ApplicationPaths.DefaultUserViewsPath;
|
var rootFolderPath = _configurationManager.ApplicationPaths.DefaultUserViewsPath;
|
||||||
var virtualFolderPath = Path.Combine(rootFolderPath, virtualFolderName);
|
var virtualFolderPath = Path.Combine(rootFolderPath, virtualFolderName);
|
||||||
|
|
||||||
@ -3095,11 +3075,6 @@ namespace Emby.Server.Implementations.Library
|
|||||||
throw new ArgumentNullException(nameof(pathInfo));
|
throw new ArgumentNullException(nameof(pathInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(pathInfo.NetworkPath) && !ValidateNetworkPath(pathInfo.NetworkPath))
|
|
||||||
{
|
|
||||||
throw new FileNotFoundException("The network path does not exist.");
|
|
||||||
}
|
|
||||||
|
|
||||||
var rootFolderPath = _configurationManager.ApplicationPaths.DefaultUserViewsPath;
|
var rootFolderPath = _configurationManager.ApplicationPaths.DefaultUserViewsPath;
|
||||||
var virtualFolderPath = Path.Combine(rootFolderPath, virtualFolderName);
|
var virtualFolderPath = Path.Combine(rootFolderPath, virtualFolderName);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user