--- gnotepad+-1.3.3/src/gtkefilesel.c Tue Mar 14 07:17:52 2000 +++ gnotepad+-1.3.3-cygwin/src/gtkefilesel.c Sat Apr 27 21:09:49 2002 @@ -2114,6 +2114,18 @@ open_new_dir(char * dir_name, struct sta rewinddir(directory); +#ifdef __CYGWIN__ + /* + * this hack prevents "//" being used for "/" when reading + * directory. Cygwin does not accept // as a synonym for "/" + */ + if (strcmp(dir_name, ("/")) == 0) + { + path_buf[0] = '\0'; + path_buf_len = 0; + } +#endif /* __CYGWIN__ */ + for (i = 0; i < entry_count; i += 1) { dirent_ptr = readdir(directory); @@ -2265,6 +2277,14 @@ efilesel_correct_dir_fullname(CmplDir * { int length = strlen(cmpl_dir->fullname); struct stat sbuf; + + #ifdef __CYGWIN__ + if (strcmp(cmpl_dir->fullname, "/") == 0) + { + return TRUE; + } + else + #endif /* __CYGWIN__ */ if (strcmp(cmpl_dir->fullname + length - 2, "/.") == 0) { if (length == 2) {