Skip to content

Commit 511aa3a

Browse files
committed
Merge branch 'develop-umbraco-version-8' into master-umbraco-version-8
2 parents df0b26a + 1daaa86 commit 511aa3a

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ configuration: Release
99

1010
environment:
1111
# Version Suffix
12-
version_suffix: alpha4
12+
version_suffix: alpha5
1313

1414
install:
1515
- ps: .\build\appveyor-semver.ps1

src/UmbracoFileSystemProviders.Azure/AzureBlobFileSystem.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ public AzureBlobFileSystem(string alias)
159159
/// </summary>
160160
public AzureFileSystem FileSystem { get; }
161161

162-
public bool CanAddPhysical => throw new NotImplementedException();
162+
/// <summary>
163+
/// Indicates whether the filesystem can add/copy a file that is on local disk, in a fast and efficient way.
164+
/// We can't so always returns false.
165+
/// </summary>
166+
public bool CanAddPhysical => false;
163167

164168
/// <summary>
165169
/// Adds a file to the file system.

src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ internal AzureFileSystem(string containerName, string rootUrl, string connection
211211
/// </summary>
212212
public string ApplicationVirtualPath { get; internal set; } = HttpRuntime.AppDomainAppVirtualPath;
213213

214-
public bool CanAddPhysical => throw new NotImplementedException();
214+
public bool CanAddPhysical => false;
215215

216216
/// <summary>
217217
/// Returns a singleton instance of the <see cref="AzureFileSystem"/> class.
@@ -344,7 +344,9 @@ public void AddFile(string path, Stream stream)
344344
/// <inheritdoc/>
345345
public void AddFile(string path, string physicalPath, bool overrideIfExists = true, bool copy = false)
346346
{
347-
//Valid as the property 'CanAddPhysical' is not implemented either
347+
var fullPath = GetFullPath(path);
348+
Current.Logger.Debug<AzureBlobFileSystem>($"NotImplemented! AddFile(path, physicalPath, overrideIfExists, copy) method executed with path:{path}, {physicalPath}, {overrideIfExists}, {copy} - fullPath: {fullPath}");
349+
348350
throw new NotImplementedException();
349351
}
350352

@@ -543,23 +545,23 @@ public IEnumerable<string> GetFiles(string path, string filter)
543545
}
544546

545547
return blobList.OfType<CloudBlockBlob>().Select(cd =>
546-
{
547-
string url = cd.Uri.AbsoluteUri;
548+
{
549+
string url = cd.Uri.AbsoluteUri;
548550

549-
if (filter.Equals("*.*", StringComparison.InvariantCultureIgnoreCase))
550-
{
551-
return url.Substring(this.rootContainerUrl.Length);
552-
}
551+
if (filter.Equals("*.*", StringComparison.InvariantCultureIgnoreCase))
552+
{
553+
return url.Substring(this.rootContainerUrl.Length);
554+
}
553555

554-
// Filter by name.
555-
filter = filter.TrimStart('*');
556-
if (url.IndexOf(filter, StringComparison.InvariantCultureIgnoreCase) > -1)
557-
{
558-
return url.Substring(this.rootContainerUrl.Length);
559-
}
556+
// Filter by name.
557+
filter = filter.TrimStart('*');
558+
if (url.IndexOf(filter, StringComparison.InvariantCultureIgnoreCase) > -1)
559+
{
560+
return url.Substring(this.rootContainerUrl.Length);
561+
}
560562

561-
return null;
562-
}).Where(x => x != null);
563+
return null;
564+
}).Where(x => x != null);
563565
}
564566

565567
/// <summary>
@@ -810,7 +812,7 @@ private CloudBlockBlob GetBlockBlobReference(string path)
810812
// blob doesn't exist yet
811813
var blobReference = this.cloudBlobContainer.GetBlockBlobReference(blobPath);
812814
return blobReference;
813-
815+
814816
}
815817
catch (StorageException ex)
816818
{

0 commit comments

Comments
 (0)