[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
When environment variable PATH is undefined
From: |
Masamichi HOSODA |
Subject: |
When environment variable PATH is undefined |
Date: |
Mon, 29 Dec 2014 17:42:36 +0900 (JST) |
When environment variable PATH is undefined, the following error occurs.
```
C:\tmp\lilypond-2.19.16-0.mingw\$_OUTDIR\usr\bin>set PATH=
C:\tmp\lilypond-2.19.16-0.mingw\$_OUTDIR\usr\bin>lilypond
GNU LilyPond 2.19.16
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
C:\tmp\lilypond-2.19.16-0.mingw\$_OUTDIR\usr\bin>
```
The following patch can fix this problem.
```
--- a/flower/file-path.cc 2014-03-18 00:29:16.000000000 +0900
+++ b/flower/file-path.cc 2014-12-29 17:18:06.887602900 +0900
@@ -52,6 +52,13 @@
concat (dirs_, string_split (p, PATHSEP));
}
+void
+File_path::parse_path (const char *p)
+{
+ if (p)
+ parse_path (static_cast<string>(p));
+}
+
bool
is_file (const string &file_name)
{
--- a/flower/include/file-path.hh 2014-03-18 00:29:16.000000000 +0900
+++ b/flower/include/file-path.hh 2014-12-29 17:28:53.070834400 +0900
@@ -44,6 +44,7 @@
bool try_append (string str);
void append (const string&);
void parse_path (const string&);
+ void parse_path (const char*);
void prepend (const string&);
};
```
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- When environment variable PATH is undefined,
Masamichi HOSODA <=