Unwrapped CreateDirectory and DeleteDirectory

This commit is contained in:
Erwin de Haan
2019-01-26 22:08:04 +01:00
parent 3a831994f6
commit d7c6d16250
58 changed files with 102 additions and 101 deletions
+3 -3
View File
@@ -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()))