Skip to content
Snippets Groups Projects
Select Git revision
0 results

combine_path.h

Blame
    • Henrik (Grubba) Grubbström's avatar
      3ec67c97
      combine_path: Fixed corner case. · 3ec67c97
      Henrik (Grubba) Grubbström authored
      combine_path() on strings starting with "./../" used to gain one
      directory level. Eg:
      
        Old behavior:
          > combine_path(".", "../foo");
          (1) Result: "../foo"
          > combine_path("./..", "foo");
          (2) Result: "foo"
          > combine_path("./../foo");
          (3) Result: "foo"
      
        New (fixed) behavior:
          > combine_path(".", "../foo");
          (1) Result: "../foo"
          > combine_path("./..", "foo");
          (2) Result: "../foo"
          > combine_path("./../foo");
          (3) Result: "../foo"
      
      Fixes [PIKE-137].
      3ec67c97
      History
      combine_path: Fixed corner case.
      Henrik (Grubba) Grubbström authored
      combine_path() on strings starting with "./../" used to gain one
      directory level. Eg:
      
        Old behavior:
          > combine_path(".", "../foo");
          (1) Result: "../foo"
          > combine_path("./..", "foo");
          (2) Result: "foo"
          > combine_path("./../foo");
          (3) Result: "foo"
      
        New (fixed) behavior:
          > combine_path(".", "../foo");
          (1) Result: "../foo"
          > combine_path("./..", "foo");
          (2) Result: "../foo"
          > combine_path("./../foo");
          (3) Result: "../foo"
      
      Fixes [PIKE-137].