Skip to content

Commit 5eb7a89

Browse files
Remove directory creation in constructor
1 parent ac4d288 commit 5eb7a89

2 files changed

Lines changed: 0 additions & 12 deletions

File tree

src/ImageSharp.Web/Caching/PhysicalFileSystemCache.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@ public PhysicalFileSystemCache(
5353
this.cacheRootPath = GetCacheRoot(options.Value, environment.WebRootPath, environment.ContentRootPath);
5454
this.cacheFolderDepth = (int)options.Value.CacheFolderDepth;
5555
this.formatUtilities = formatUtilities;
56-
57-
// Ensure cache directory exists
58-
if (!Directory.Exists(this.cacheRootPath))
59-
{
60-
Directory.CreateDirectory(this.cacheRootPath);
61-
}
6256
}
6357

6458
/// <summary>

src/ImageSharp.Web/Providers/PhysicalFileSystemProvider.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ public PhysicalFileSystemProvider(
4747

4848
this.providerRootPath = GetProviderRoot(options.Value, environment.WebRootPath, environment.ContentRootPath);
4949
this.formatUtilities = formatUtilities;
50-
51-
// Ensure provider directory exists
52-
if (!Directory.Exists(this.providerRootPath))
53-
{
54-
Directory.CreateDirectory(this.providerRootPath);
55-
}
5650
}
5751

5852
/// <inheritdoc/>

0 commit comments

Comments
 (0)