enable directory path with spaces for spinit,
if path is put into double quotes
This commit is contained in:
parent
eb15768095
commit
3350663cdc
|
|
@ -271,9 +271,17 @@ ft_cpinit(void)
|
||||||
/* jump over leading spaces */
|
/* jump over leading spaces */
|
||||||
for (copys = s = cp_tildexpand(Lib_Path); copys && *copys; ) {
|
for (copys = s = cp_tildexpand(Lib_Path); copys && *copys; ) {
|
||||||
s = skip_ws(s);
|
s = skip_ws(s);
|
||||||
/* copy s into buf until space is seen, r is the actual position */
|
if (s[0] == '\"') {
|
||||||
for (r = buf; *s && !isspace_c(*s); r++, s++)
|
/* copy string between leading and trailing " */
|
||||||
*r = *s;
|
s++;
|
||||||
|
for (r = buf; *s && (*s != '\"'); r++, s++)
|
||||||
|
*r = *s;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* copy s into buf until space is seen, r is the actual position */
|
||||||
|
for (r = buf; *s && !isspace_c(*s); r++, s++)
|
||||||
|
*r = *s;
|
||||||
|
}
|
||||||
tfree(copys);
|
tfree(copys);
|
||||||
/* add a path separator to buf at actual position */
|
/* add a path separator to buf at actual position */
|
||||||
(void) strcpy(r, DIR_PATHSEP);
|
(void) strcpy(r, DIR_PATHSEP);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue