Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #5340 delete auxiliary objects in Swift #5356

Merged
merged 1 commit into from Dec 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -518,13 +518,17 @@ private StoredObject initializeSwiftFileObject(boolean writeAccess, String auxIt
Properties p = getSwiftProperties();
swiftEndPoint = p.getProperty("swift.default.endpoint");

// Swift uses this to create pseudo-hierarchical folders
String swiftPseudoFolderPathSeparator = "/";

//swiftFolderPath = dataFile.getOwner().getDisplayName();
String swiftFolderPathSeparator = "-";
String authorityNoSlashes = owner.getAuthority().replace("/", swiftFolderPathSeparator);
swiftFolderPath = owner.getProtocolForFileStorage() + swiftFolderPathSeparator
+ authorityNoSlashes.replace(".", swiftFolderPathSeparator)
+ swiftFolderPathSeparator + owner.getIdentifierForFileStorage();
swiftFileName = storageIdentifier;
+ authorityNoSlashes.replace(".", swiftFolderPathSeparator);

swiftFileName = owner.getIdentifierForFileStorage() + swiftPseudoFolderPathSeparator
+ storageIdentifier;
//setSwiftContainerName(swiftFolderPath);
//swiftFileName = dataFile.getDisplayName();
//Storage Identifier is now updated after the object is uploaded on Swift.
Expand Down Expand Up @@ -569,10 +573,14 @@ private StoredObject initializeSwiftFileObject(boolean writeAccess, String auxIt
Properties p = getSwiftProperties();
swiftEndPoint = p.getProperty("swift.default.endpoint");
String swiftFolderPathSeparator = "-";

// Swift uses this to create pseudo-hierarchical folders
String swiftPseudoFolderPathSeparator = "/";

String authorityNoSlashes = dataset.getAuthorityForFileStorage().replace("/", swiftFolderPathSeparator);
swiftFolderPath = dataset.getProtocolForFileStorage() + swiftFolderPathSeparator +
authorityNoSlashes.replace(".", swiftFolderPathSeparator) +
swiftFolderPathSeparator + dataset.getIdentifierForFileStorage();
swiftPseudoFolderPathSeparator + dataset.getIdentifierForFileStorage();

swiftFileName = auxItemTag;
dvObject.setStorageIdentifier("swift://" + swiftEndPoint + ":" + swiftFolderPath);
Expand Down