[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 550da79 3/4: Remove alien msw root-name from
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 550da79 3/4: Remove alien msw root-name from configurable print directory |
Date: |
Wed, 11 Nov 2020 12:05:46 -0500 (EST) |
branch: master
commit 550da79adbd8a1dd248ecf03333e86c9f05f3b41
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Remove alien msw root-name from configurable print directory
Arguably the configurable default input filename should be treated
likewise, or the issue should be resolved at a deeper level. See:
https://lists.nongnu.org/archive/html/lmi/2020-10/msg00037.html
---
configurable_settings.cpp | 1 +
preferences_model.cpp | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/configurable_settings.cpp b/configurable_settings.cpp
index 288284a..8539555 100644
--- a/configurable_settings.cpp
+++ b/configurable_settings.cpp
@@ -164,6 +164,7 @@ configurable_settings::configurable_settings()
try
{
+ print_directory_ = remove_alien_msw_root(print_directory_).string();
print_directory_ = fs::system_complete(print_directory_).string();
validate_directory(print_directory_, "Print directory");
}
diff --git a/preferences_model.cpp b/preferences_model.cpp
index 7a7258a..086fcdb 100644
--- a/preferences_model.cpp
+++ b/preferences_model.cpp
@@ -26,6 +26,7 @@
#include "alert.hpp"
#include "configurable_settings.hpp"
#include "miscellany.hpp" // begins_with()
+#include "path_utility.hpp" // remove_alien_msw_root()
#include "ssize_lmi.hpp"
#include "value_cast.hpp"
@@ -57,7 +58,7 @@ std::string generic_path(std::string const& s)
#if defined LMI_MSW
return fs::system_complete(fs::path(s)).string();
#else // !defined LMI_MSW
- return s;
+ return remove_alien_msw_root(s).string();
#endif // !defined LMI_MSW
}