Quote the names of directories when they contain the space character

This commit is contained in:
Pierre Pronchery 2013-03-05 03:08:26 +01:00
parent f0efbdaa2f
commit 999d9d5f78

View File

@ -180,7 +180,10 @@ static int _variables_print(Configure * configure, FILE * fp,
continue;
c = prints[i];
prints[i] = '\0';
fprintf(fp, " %s", prints);
if(strchr(prints, ' ') != NULL)
fprintf(fp, " \"%s\"", prints);
else
fprintf(fp, " %s", prints);
if(c == '\0')
break;
prints += i + 1;