mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-31 21:08:27 +01:00
Check for path overlaps (#12832)
This commit is contained in:
@@ -35,8 +35,7 @@ namespace MediaBrowser.Common.Configuration
|
||||
transcodingTempPath = Path.Combine(configurationManager.CommonApplicationPaths.CachePath, "transcodes");
|
||||
}
|
||||
|
||||
// Make sure the directory exists
|
||||
Directory.CreateDirectory(transcodingTempPath);
|
||||
configurationManager.CommonApplicationPaths.CreateAndCheckMarker(transcodingTempPath, "transcode", true);
|
||||
return transcodingTempPath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,5 +90,18 @@ namespace MediaBrowser.Common.Configuration
|
||||
/// </summary>
|
||||
/// <value>The trickplay path.</value>
|
||||
string TrickplayPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks and creates all known base paths.
|
||||
/// </summary>
|
||||
void MakeSanityCheckOrThrow();
|
||||
|
||||
/// <summary>
|
||||
/// Checks and creates the given path and adds it with a marker file if non existant.
|
||||
/// </summary>
|
||||
/// <param name="path">The path to check.</param>
|
||||
/// <param name="markerName">The common marker file name.</param>
|
||||
/// <param name="recursive">Check for other settings paths recursivly.</param>
|
||||
void CreateAndCheckMarker(string path, string markerName, bool recursive = false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user