lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] master fc479ef 1/4: Demonstrate a boost::filesys


From: Vadim Zeitlin
Subject: Re: [lmi] [lmi-commits] master fc479ef 1/4: Demonstrate a boost::filesystem oddity
Date: Wed, 11 Nov 2020 21:38:20 +0100

On Wed, 11 Nov 2020 12:05:46 -0500 (EST) Greg Chicares 
<gchicares@sbcglobal.net> wrote:

GC> branch: master
GC> commit fc479ef7995600d2e9fceb3a8af9e063d96d1422
GC> Author: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> 
GC>     Demonstrate a boost::filesystem oddity
GC> ---
GC>  path_utility_test.cpp | 24 ++++++++++++++++++++++++
GC>  1 file changed, 24 insertions(+)
GC> 
GC> diff --git a/path_utility_test.cpp b/path_utility_test.cpp
GC> index a9ca661..7108e08 100644
GC> --- a/path_utility_test.cpp
GC> +++ b/path_utility_test.cpp
GC> @@ -407,6 +407,29 @@ void test_path_validation()
GC>      fs::remove("path_utility_test_dir");
GC>  }
GC>  
GC> +/// Demonstrate a boost::filesystem oddity.
GC> +///
GC> +/// A print directory is specified in 'configurable_settings.xml', and
GC> +/// managed by 'preferences_model.cpp'. Using an msw build of lmi to
GC> +/// change its value endues it with a 'root-name'. Subsequently using
GC> +/// a posix build of lmi does not remove the 'root-name'; instead, it
GC> +/// does something bizarre, viz.:
GC> +///   fs::system_complete(/opt/lmi/data) returns:
GC> +///   /opt/lmi/data
GC> +///   fs::system_complete(Z:/opt/lmi/data) returns:
GC> +///   /opt/lmi/gcc_x86_64-pc-linux-gnu/build/ship/Z:/opt/lmi/data

 Sorry if I'm missing something, but why is this bizarre? For MSW version,
Z:/opt/lmi/data is an absolute path, but for POSIX version it's a relative
one, so "completing" it prepends the current working directory to it.

 FWIW, I think the real solution to the problem of reusing the same
configuration file between the different builds of the program is to not do
it.

 Regards,
VZ

Attachment: pgp6pWvV5AfE7.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]