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-26 04:51:37 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2017-08-26 04:51:37 +0300
commitbfda7e1ddc7acf17b03e5ebdda48e7798b17fb42 (patch)
treed0e312f11eb5c4e0de6102180467c80a689118f9
parent9d506aafbf0bead69a6b93fdb3096f5e5d4d3c1c (diff)
On POSIX fs_handle::unlink() was incapable of unlinking directories, fixed.
-rw-r--r--include/afio/revision.hpp6
-rw-r--r--include/afio/v2.0/detail/impl/posix/fs_handle.ipp7
m---------include/afio/v2.0/outcome0
m---------include/afio/v2.0/quickcpplib0
m---------test/kerneltest0
5 files changed, 9 insertions, 4 deletions
diff --git a/include/afio/revision.hpp b/include/afio/revision.hpp
index 55da7440..fd29fb15 100644
--- a/include/afio/revision.hpp
+++ b/include/afio/revision.hpp
@@ -1,4 +1,4 @@
// Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time
-#define AFIO_PREVIOUS_COMMIT_REF 7f1373155416cf4b625e5687bdbb15e4588d045c
-#define AFIO_PREVIOUS_COMMIT_DATE "2017-08-25 18:18:28 +00:00"
-#define AFIO_PREVIOUS_COMMIT_UNIQUE 7f137315
+#define AFIO_PREVIOUS_COMMIT_REF 9d506aafbf0bead69a6b93fdb3096f5e5d4d3c1c
+#define AFIO_PREVIOUS_COMMIT_DATE "2017-08-26 01:28:05 +00:00"
+#define AFIO_PREVIOUS_COMMIT_UNIQUE 9d506aaf
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 16ef2e49..5848191b 100644
--- a/include/afio/v2.0/detail/impl/posix/fs_handle.ipp
+++ b/include/afio/v2.0/detail/impl/posix/fs_handle.ipp
@@ -172,7 +172,12 @@ result<void> fs_handle::unlink(deadline d) noexcept
filesystem::path filename;
OUTCOME_TRY(dirh, containing_directory(std::ref(filename), h, *this, d));
if(-1 == ::unlinkat(dirh.native_handle().fd, filename.c_str(), 0))
- return {errno, std::system_category()};
+ {
+ if(EISDIR != errno)
+ return {errno, std::system_category()};
+ if(-1 == ::unlinkat(dirh.native_handle().fd, filename.c_str(), AT_REMOVEDIR))
+ return {errno, std::system_category()};
+ }
return success();
}
diff --git a/include/afio/v2.0/outcome b/include/afio/v2.0/outcome
-Subproject dd7adfb7916d51cc9f2e89822a2be7383e285fc
+Subproject f863d85ca2fe8ad843636b5e0b1ec799934af33
diff --git a/include/afio/v2.0/quickcpplib b/include/afio/v2.0/quickcpplib
-Subproject b4bd336a89137c15b479b5dadd5a0163560db9d
+Subproject ad4644b1b276caaab63d7479f5208f01865ddd4
diff --git a/test/kerneltest b/test/kerneltest
-Subproject 67ebb27d5690479f60a369a1c6a2da24805aa73
+Subproject aaa4eff38254324d5337660b0dd8c6e0e51e6bc