public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/101510] std::filesystem::create_directory  on an existing symlink to a directory
Date: Wed, 11 Aug 2021 22:50:20 +0000	[thread overview]
Message-ID: <bug-101510-4-SDf4TY7jhB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101510-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #23 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:f8ac77533951d79d4e6a65841aa30293b2f11fdd

commit r9-9669-gf8ac77533951d79d4e6a65841aa30293b2f11fdd
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jul 20 18:15:48 2021 +0100

    libstdc++: Fix create_directories to resolve symlinks [PR101510]

    When filesystem__create_directories checks to see if the path already
    exists and resolves to a directory, it uses filesystem::symlink_status,
    which means it reports an error if the path is a symlink. It should use
    filesystem::status, so that the target directory is detected, and no
    error is reported.

    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

    libstdc++-v3/ChangeLog:

            PR libstdc++/101510
            * src/c++17/fs_ops.cc (fs::create_directories): Use status
            instead of symlink_status.
            * src/filesystem/ops.cc (fs::create_directories): Likewise.
            * testsuite/27_io/filesystem/operations/create_directories.cc:
            Check symlink to existing directory.
            * testsuite/27_io/filesystem/operations/create_directory.cc: Do
            not test with symlinks on Windows.
            *
testsuite/experimental/filesystem/operations/create_directories.cc:
            Check symlink to existing directory.
            * testsuite/experimental/filesystem/operations/create_directory.cc:
            Do not test with symlinks on Windows.

    (cherry picked from commit 124eaa50e0a34f5f89572c1aa812c50979da58fc)

  parent reply	other threads:[~2021-08-11 22:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19 12:35 [Bug c++/101510] New: " enometh at meer dot net
2021-07-19 22:44 ` [Bug libstdc++/101510] " redi at gcc dot gnu.org
2021-07-20 11:43 ` redi at gcc dot gnu.org
2021-07-20 11:46 ` redi at gcc dot gnu.org
2021-07-20 11:58 ` cvs-commit at gcc dot gnu.org
2021-07-20 12:01 ` redi at gcc dot gnu.org
2021-07-20 15:55 ` enometh at meer dot net
2021-07-20 16:00 ` redi at gcc dot gnu.org
2021-07-20 16:20 ` enometh at meer dot net
2021-07-20 16:25 ` redi at gcc dot gnu.org
2021-07-20 16:40 ` enometh at meer dot net
2021-07-20 16:53 ` redi at gcc dot gnu.org
2021-07-20 16:57 ` enometh at meer dot net
2021-07-20 16:58 ` redi at gcc dot gnu.org
2021-07-20 16:59 ` redi at gcc dot gnu.org
2021-07-20 17:05 ` enometh at meer dot net
2021-07-20 19:35 ` cvs-commit at gcc dot gnu.org
2021-07-20 19:38 ` redi at gcc dot gnu.org
2021-07-21  1:47 ` enometh at meer dot net
2021-08-11 15:42 ` cvs-commit at gcc dot gnu.org
2021-08-11 15:42 ` cvs-commit at gcc dot gnu.org
2021-08-11 16:35 ` cvs-commit at gcc dot gnu.org
2021-08-11 16:35 ` cvs-commit at gcc dot gnu.org
2021-08-11 22:50 ` cvs-commit at gcc dot gnu.org
2021-08-11 22:50 ` cvs-commit at gcc dot gnu.org [this message]
2021-08-11 22:53 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-101510-4-SDf4TY7jhB@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).