Skip to content

Commit

Permalink
Merge pull request #70 from henneberger/fixdatapath
Browse files Browse the repository at this point in the history
Use last instance of /data/ and /metadata/ path
  • Loading branch information
samansmink authored Oct 9, 2024
2 parents 3f6d753 + a9bd6f9 commit b16b95b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ string IcebergUtils::GzFileToString(const string &path, FileSystem &fs) {
}

string IcebergUtils::GetFullPath(const string &iceberg_path, const string &relative_file_path, FileSystem &fs) {
std::size_t found = relative_file_path.find("/metadata/");
std::size_t found = relative_file_path.rfind("/metadata/");
if (found != string::npos) {
return fs.JoinPath(iceberg_path, relative_file_path.substr(found + 1));
}

found = relative_file_path.find("/data/");
found = relative_file_path.rfind("/data/");
if (found != string::npos) {
return fs.JoinPath(iceberg_path, relative_file_path.substr(found + 1));
}
Expand Down

0 comments on commit b16b95b

Please sign in to comment.