[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master bb267b7 18/33: Reinstate some recently-remove
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master bb267b7 18/33: Reinstate some recently-removed documentation |
Date: |
Mon, 3 May 2021 08:15:53 -0400 (EDT) |
branch: master
commit bb267b715b8944a3c6e9c897f71f9ca3a8eda203
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Reinstate some recently-removed documentation
Replacing boost with C++20 terms may have changed the sense of some
statements.
---
path_utility.cpp | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/path_utility.cpp b/path_utility.cpp
index 7a2657a..acc9fb3 100644
--- a/path_utility.cpp
+++ b/path_utility.cpp
@@ -36,11 +36,17 @@
/// Change '/path/to/file' to '/some/other/place/file'.
///
-/// Motivation: It is anomalous that std::filesystem permits this:
+/// Motivation: It was anomalous that boost did this:
/// fs::path file("/bin/sh";
/// fs::path dir ("/usr/bin");
-/// dir / file; // returns "/bin/sh"
-/// where true == file.is_absolute().
+/// dir / file; // boost returned "/usr/bin/bin/sh"
+/// even on posix, where
+/// true == file.is_complete() // boost
+/// It is at least weird that std::filesystem does this:
+/// dir / file; // C++20 std::filesystem returns "/bin/sh"
+/// BOOST !! Rewrite the next two lines:
+/// even on posix, where
+/// true == file.is_absolute() // std::filesystem
///
/// Arguably the arguments should be given in the opposite order:
/// modify_directory("sh", "/usr/bin") // present order
@@ -68,6 +74,10 @@
/// but the same function call would return 'false' after
/// rm -rf /usr/lib ; touch /usr/lib
/// Notably, path("/bin/sh/") fails because it hasn't the filename.
+/// [original comment for boost:
+/// Notably, path("/bin/sh/") succeeds, silently discarding the
+/// trailing '/'.
+/// ...end boost comment]
fs::path modify_directory
(fs::path const& original_filepath
- [lmi-commits] [lmi] master updated (a5afa42 -> 0296ac4), Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master c8143ad 02/33: Include "path.hpp" even if it might not be needed today, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 1ac62bc 13/33: Rewrite a unit test, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master cff71ea 11/33: Improve documentation, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master f767cd4 17/33: Fix defect introduced 20190527T1635Z: erroneous documentation, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 325e88a 12/33: Increase filename portability, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 271a1b8 09/33: Note a deferred boost-migration question, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 2025958 06/33: Names are stronger than comments, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master bb267b7 18/33: Reinstate some recently-removed documentation,
Greg Chicares <=
- [lmi-commits] [lmi] master 6d7a545 26/33: Reinsert a required empty line, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master ea4515f 04/33: Further deboostify, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 4faab10 01/33: Adjust whitespace for microconcinnity, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master f4f4756 05/33: Resolve a marked defect [283], Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master c98c00d 10/33: Say "basename" rather than "leaf", Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 1a68606 23/33: Conserve 80-character maximum width, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master e33e392 22/33: Correct and reformat the modify_directory() documentation, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master fd44389 03/33: Include appropriate headers, and say why they're included, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master fdc0f5a 07/33: Deboostify even more, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 41274a8 14/33: Improve documentation, Greg Chicares, 2021/05/03