public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/106461] New: filesystem::path("//.").parent_path() results in path("/") and not path("//")
@ 2022-07-28  6:06 services+gccbugs at vasama dot org
  0 siblings, 0 replies; only message in thread
From: services+gccbugs at vasama dot org @ 2022-07-28  6:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106461

            Bug ID: 106461
           Summary: filesystem::path("//.").parent_path() results in
                    path("/") and not path("//")
           Product: gcc
           Version: 12.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: services+gccbugs at vasama dot org
  Target Milestone: ---

path("//.").parent_path().string() returns "/"s and not "//"s as might be
expected.
path("//").parent_path().string() returns "//"s as expected.

https://godbolt.org/z/sT5zn7zM9

#include <filesystem>
#include <cassert>
int main() {
    assert(std::filesystem::path("//").parent_path().string() == "//");
    assert(std::filesystem::path("//.").parent_path().string() == "//");
}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-28  6:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-28  6:06 [Bug libstdc++/106461] New: filesystem::path("//.").parent_path() results in path("/") and not path("//") services+gccbugs at vasama dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).