mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-08 10:13:36 -08:00
[Win32] DIRECTORY now lists root directory correctly (M. Goffioul)
This commit is contained in:
parent
52d7fed2ac
commit
08eaeb9a93
2 changed files with 14 additions and 2 deletions
|
|
@ -33,6 +33,8 @@ ECL 1.0:
|
|||
|
||||
- [Win32] Processes are now correctly listed with MP:ALL-PROCESSES (M. Goffioul)
|
||||
|
||||
- [Win32] DIRECTORY now lists root directory correctly (M. Goffioul)
|
||||
|
||||
;;; Local Variables: ***
|
||||
;;; mode:text ***
|
||||
;;; fill-column:79 ***
|
||||
|
|
|
|||
|
|
@ -72,6 +72,9 @@ static cl_object
|
|||
current_dir(void) {
|
||||
cl_object output;
|
||||
const char *ok;
|
||||
#ifdef _MSC_VER
|
||||
char *c;
|
||||
#endif
|
||||
cl_index size = 128;
|
||||
|
||||
do {
|
||||
|
|
@ -86,8 +89,15 @@ current_dir(void) {
|
|||
strcpy(other->base_string.self, output->base_string.self);
|
||||
output = other;
|
||||
}
|
||||
output->base_string.self[size++] = '/';
|
||||
output->base_string.self[size] = 0;
|
||||
#ifdef _MSC_VER
|
||||
for (c=output->base_string.self; *c; c++)
|
||||
if (*c == '\\')
|
||||
*c = '/';
|
||||
#endif
|
||||
if (output->base_string.self[size-1] != '/') {
|
||||
output->base_string.self[size++] = '/';
|
||||
output->base_string.self[size] = 0;
|
||||
}
|
||||
output->base_string.fillp = size;
|
||||
return output;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue