Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2017-08-27 02:26:56 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2017-08-27 02:26:56 +0300
commit892c11cf6569f1f39dd03cab33870251c873dd42 (patch)
tree5db6cc1af625bff610ee7349b3070f9b0d9fd97a
parent5a8179a1f1ddf7c7a14a5f6836973505e8fa406f (diff)
Fix bug where renaming and unlinking were failing on POSIX if race free semantics were disabled.
-rw-r--r--include/afio/v2.0/detail/impl/posix/fs_handle.ipp4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/afio/v2.0/detail/impl/posix/fs_handle.ipp b/include/afio/v2.0/detail/impl/posix/fs_handle.ipp
index 5848191b..c3c7a95d 100644
--- a/include/afio/v2.0/detail/impl/posix/fs_handle.ipp
+++ b/include/afio/v2.0/detail/impl/posix/fs_handle.ipp
@@ -77,7 +77,11 @@ inline result<path_handle> containing_directory(optional<std::reference_wrapper<
continue;
path_handle currentdirh = std::move(currentdirh_.value());
if(h.flags() & handle::flag::disable_safety_unlinks)
+ {
+ if(out_filename)
+ out_filename->get() = filename.path();
return success(std::move(currentdirh));
+ }
// Open the same file name, and compare dev and inode
path_view::c_str zpath(filename);
int fd = ::openat(currentdirh.native_handle().fd, zpath.buffer, O_CLOEXEC);