Skip to content

Commit

Permalink
Synchronization of files with a windows backslash.
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrczarnas committed Feb 27, 2024
1 parent e54ea26 commit 345dc50
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,11 @@ public boolean equals(Object o) {
public int hashCode() {
return relativePath.hashCode();
}

@Override
public String toString() {
return "FileMetadata{" +
"relativePath=" + relativePath +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -704,4 +704,11 @@ public void truncateToLicenseLimits(DqoCloudApiKeyPayload apiKeyPayload) {
}
}
}

@Override
public String toString() {
return "FolderMetadata{" +
"relativePath=" + relativePath +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ public static Path convertEncodedPathToFullyUrlEncodedPath(Path path) {
for (int i = 0; i < pathElements.length; i++) {
String rawName = decodeFileSystemName(pathElements[i]);
urlEncodedPathElements[i] = URLEncoder.encode(rawName, StandardCharsets.UTF_8)
.replace("%", "%25")
.replace("+", "%20"); // fixing spaces, because GCP storage bucket does not use '+' for a space
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public FolderMetadata listFilesInFolder(FileSystemSynchronizationRoot fileSystem

for (Blob blob : blogPage.iterateAll()) {
String blobFileName = blob.getName();
Path fullBlobFilePathInsideBucket = FileNameSanitizer.convertRawPathToEncodedPath(blobFileName);
Path fullBlobFilePathInsideBucket = Path.of(blobFileName.replace("%25", "%"));
Map<String, String> metadata = blob.getMetadata();
if (metadata != null && Objects.equals(metadata.get("DQOFileType"), "empty-parquet")) {
// ignoring because it is a special empty file to ensure that the schema of an external table could be detected from a parquet file
Expand Down

0 comments on commit 345dc50

Please sign in to comment.