Skip to content

Commit b9e4bd6

Browse files
committed
Merge commit '0a10d642167b49670d1fcb2bb12365aed9bbcecc'
2 parents 1e545c7 + 0a10d64 commit b9e4bd6

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
os: Visual Studio 2017
22

33
# Version format
4-
version: 1.0.2.{build}
4+
version: 1.0.3.{build}
55

66
cache:
77
- src\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified

src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace Our.Umbraco.FileSystemProviders.Azure
1616
using System.Linq;
1717
using System.Text.RegularExpressions;
1818
using System.Web;
19+
using global::Umbraco.Core.Configuration;
1920
using global::Umbraco.Core.IO;
2021
using Microsoft.WindowsAzure.Storage;
2122
using Microsoft.WindowsAzure.Storage.Blob;
@@ -540,8 +541,19 @@ public DateTimeOffset GetLastModified(string path)
540541
/// <returns>
541542
/// The <see cref="string"/> representing the relative path.
542543
/// </returns>
544+
/// <remarks>
545+
/// Umbraco 7.5.15 changed the way that relative paths are used for media upload.
546+
/// This is the fixing issue where uploading file to replace creates new folder.
547+
/// </remarks>
543548
public string GetRelativePath(string fullPathOrUrl)
544549
{
550+
var lastSafeVersion = new Version(7, 5, 14);
551+
552+
if (UmbracoVersion.Current.CompareTo(lastSafeVersion) > 0)
553+
{
554+
return this.FixPath(fullPathOrUrl);
555+
}
556+
545557
return this.ResolveUrl(fullPathOrUrl, true);
546558
}
547559

0 commit comments

Comments
 (0)