diff --git a/MediaBrowser.Api/Images/ImageService.cs b/MediaBrowser.Api/Images/ImageService.cs
index 957d73c2d3..7122c8fc12 100644
--- a/MediaBrowser.Api/Images/ImageService.cs
+++ b/MediaBrowser.Api/Images/ImageService.cs
@@ -637,7 +637,11 @@ namespace MediaBrowser.Api.Images
ResponseHeaders = headers,
ContentType = imageResult.Item2,
IsHeadRequest = isHeadRequest,
- Path = imageResult.Item1
+ Path = imageResult.Item1,
+
+ // Sometimes imagemagick keeps a hold on the file briefly even after it's done writing to it.
+ // I'd rather do this than add a delay after saving the file
+ FileShare = FileShare.ReadWrite
});
}
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs
index c16c635786..ec40fe4b19 100644
--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs
+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs
@@ -197,6 +197,8 @@ namespace MediaBrowser.WebDashboard.Api
{
var path = request.ResourceName;
+ path = path.Replace("bower_components" + _appHost.ApplicationVersion, "bower_components", StringComparison.OrdinalIgnoreCase);
+
var contentType = MimeTypes.GetMimeType(path);
// Bounce them to the startup wizard if it hasn't been completed yet
@@ -263,22 +265,6 @@ namespace MediaBrowser.WebDashboard.Api
return new PackageCreator(_fileSystem, _localization, Logger, _serverConfigurationManager, _jsonSerializer);
}
- ///
- /// Determines whether the specified path is HTML.
- ///
- /// The path.
- /// true if the specified path is HTML; otherwise, false.
- private bool IsHtml(string path)
- {
- return Path.GetExtension(path).EndsWith("html", StringComparison.OrdinalIgnoreCase);
- }
-
- private void CopyFile(string src, string dst)
- {
- _fileSystem.CreateDirectory(Path.GetDirectoryName(dst));
- _fileSystem.CopyFile(src, dst, true);
- }
-
public async Task