Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

Commit 5dc9308

Browse files
author
Josh Friedman
committed
Uncommenting setting metadata and properties on exist calls for shares and directories
1 parent c7783e5 commit 5dc9308

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

microsoft-azure-storage-test/src/com/microsoft/azure/storage/file/CloudFileDirectoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void cloudFileDirectorySetUp() throws URISyntaxException, StorageExceptio
6060

6161
@After
6262
public void cloudFileDirectoryTearDown() throws StorageException {
63-
this.share.deleteIfExists();
63+
this.share.deleteIfExists(DeleteShareSnapshotsOption.INCLUDE_SNAPSHOTS, null, null, null);
6464
}
6565

6666
/**

microsoft-azure-storage-test/src/com/microsoft/azure/storage/file/CloudFileShareTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void fileShareTestMethodSetUp() throws StorageException, URISyntaxExcepti
6262

6363
@After
6464
public void fileShareTestMethodTearDown() throws StorageException {
65-
this.share.deleteIfExists();
65+
this.share.deleteIfExists(DeleteShareSnapshotsOption.INCLUDE_SNAPSHOTS, null, null, null);
6666
}
6767

6868
/**

microsoft-azure-storage-test/src/com/microsoft/azure/storage/file/CloudFileTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void fileTestMethodSetUp() throws URISyntaxException, StorageException {
8686

8787
@After
8888
public void fileTestMethodTearDown() throws StorageException {
89-
this.share.deleteIfExists();
89+
this.share.deleteIfExists(DeleteShareSnapshotsOption.INCLUDE_SNAPSHOTS, null, null, null);
9090
}
9191

9292
/**

microsoft-azure-storage/src/com/microsoft/azure/storage/file/CloudFileDirectory.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,11 @@ public Boolean preProcessResponse(CloudFileDirectory directory, CloudFileClient
532532
OperationContext context) throws Exception {
533533
if (this.getResult().getStatusCode() == HttpURLConnection.HTTP_OK) {
534534
directory.updatePropertiesFromResponse(this.getConnection());
535-
// // Set properties
536-
// final FileDirectoryAttributes attributes =
537-
// FileResponse.getFileDirectoryAttributes(this.getConnection(), client.isUsePathStyleUris());
538-
// directory.setMetadata(attributes.getMetadata());
539-
// directory.setProperties(attributes.getProperties());
535+
// Set properties
536+
final FileDirectoryAttributes attributes =
537+
FileResponse.getFileDirectoryAttributes(this.getConnection(), client.isUsePathStyleUris());
538+
directory.setMetadata(attributes.getMetadata());
539+
directory.setProperties(attributes.getProperties());
540540

541541
return Boolean.valueOf(true);
542542
}

microsoft-azure-storage/src/com/microsoft/azure/storage/file/CloudFileShare.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,10 +1020,10 @@ public Boolean preProcessResponse(CloudFileShare share, CloudFileClient client,
10201020
throws Exception {
10211021
if (this.getResult().getStatusCode() == HttpURLConnection.HTTP_OK) {
10221022
share.updatePropertiesFromResponse(this.getConnection());
1023-
// final FileShareAttributes attributes = FileResponse.getFileShareAttributes(this.getConnection(),
1024-
// client.isUsePathStyleUris());
1025-
// share.metadata = attributes.getMetadata();
1026-
// share.properties = attributes.getProperties();
1023+
final FileShareAttributes attributes = FileResponse.getFileShareAttributes(this.getConnection(),
1024+
client.isUsePathStyleUris());
1025+
share.metadata = attributes.getMetadata();
1026+
share.properties = attributes.getProperties();
10271027

10281028
return Boolean.valueOf(true);
10291029
}

0 commit comments

Comments
 (0)