Commit 9997db6a authored by Julius Athenstaedt's avatar Julius Athenstaedt Committed by Marc Vef
Browse files

catch edgecase of relative paths, Changelog

parent 8113718a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -70,6 +70,9 @@ replicas ([!166](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/141)

### New

- Rewrite of the resolve path function to improve performance by making the
  use of syscall for following symlinks optional
  ([!183](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/183)).
- Support for client-side per process logging, activated
  with `LIBGKFS_LOG_PER_PROCESS` ([!179](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/179)).
- Support mtime with option gkfs::config::metadata::
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ resolve_new(const string& path) {
            LOG(DEBUG, "path: \"{}\", mountdir: \"{}\"", absolute_path,
                CTX->mountdir());
            if(last_component_pos.empty()) {
                resolved = "/";
                resolved = "";
            } else {
                resolved.erase(last_component_pos.top());
                last_component_pos.pop();
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ def test_pathresolution(gkfs_daemon, gkfs_client):
    ret = gkfs_client.chdir(extdir)
    assert ret.retval == 0

    ret = gkfs_client.getcwd_validate(str(intdir)+"../../../../../../../../../../../../../../../../../../.."+str(intdir))
    ret = gkfs_client.getcwd_validate(str(intdir)+"/../../../../../../../../../../../../../../../../../../.."+str(intdir))
    assert ret.path == str(intdir)
    assert ret.retval == 0

+1 −0
Original line number Diff line number Diff line
@@ -133,6 +133,7 @@ SCENARIO(" resolve fn should handle external paths ",
                TEST_PAIR(gkfs::path::resolve_new("./tmp//bar/./"), false,
                          "/home/foo/tmp/bar");
                TEST_PAIR(gkfs::path::resolve_new("../../../.."), false, "/");
                TEST_PAIR(gkfs::path::resolve_new("../../../../foo"), false, "/foo");
            }
        }
    }