Unwrapped CreateDirectory and DeleteDirectory
This commit is contained in:
@@ -219,7 +219,7 @@ namespace Jellyfin.Drawing.Skia
|
||||
|
||||
var tempPath = Path.Combine(_appPaths.TempDirectory, Guid.NewGuid() + Path.GetExtension(path) ?? string.Empty);
|
||||
|
||||
fileSystem.CreateDirectory(Path.GetDirectoryName(tempPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(tempPath));
|
||||
fileSystem.CopyFile(path, tempPath, true);
|
||||
|
||||
return tempPath;
|
||||
@@ -532,7 +532,7 @@ namespace Jellyfin.Drawing.Skia
|
||||
// If all we're doing is resizing then we can stop now
|
||||
if (!hasBackgroundColor && !hasForegroundColor && blur == 0 && !hasIndicator)
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
using (var outputStream = new SKFileWStream(outputPath))
|
||||
using (var pixmap = new SKPixmap(new SKImageInfo(width, height), resizedBitmap.GetPixels()))
|
||||
{
|
||||
@@ -584,7 +584,7 @@ namespace Jellyfin.Drawing.Skia
|
||||
DrawIndicator(canvas, width, height, options);
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
using (var outputStream = new SKFileWStream(outputPath))
|
||||
{
|
||||
using (var pixmap = new SKPixmap(new SKImageInfo(width, height), saveBitmap.GetPixels()))
|
||||
|
||||
Reference in New Issue
Block a user