>>>>> Lars Bj�rndal writes:

 >>  Is there any empty drive? That has no files at all?

 Lars> Yes, it is! Is that a problem? Why is it a problem just
 Lars> sometimes?

        Hmm, It's not a problem until some programs scan it. Can you
        try attached patch?

 Lars> I have also a program in autoexec.emu that checks what drive
 Lars> letter that is a ram-drive (ramdrv.sys). Tis result in system
 Lars> hang while starting dosemu. It happen just some times.

 Lars> Is it posible to mount and lredir a linux device that is a
 Lars> ram-drive?

        Sure. 

-- 
  Sergey Suleymanov
diff -urbN dosemu-1.0.2.orig/src/dosext/mfs/mfs.c dosemu-1.0.2/src/dosext/mfs/mfs.c
--- dosemu-1.0.2.orig/src/dosext/mfs/mfs.c	Wed Aug  8 10:41:47 2001
+++ dosemu-1.0.2/src/dosext/mfs/mfs.c	Mon Jan 21 11:30:53 2002
@@ -3538,7 +3593,11 @@
 
     hlist = get_dir(fpath, fname, fext);
     if (hlist==NULL)  {
+#if 0
        SETWORD(&(state->eax), PATH_NOT_FOUND);
+#else
+       SETWORD(&(state->eax), NO_MORE_FILES);
+#endif
        return (FALSE);
     }
 
@@ -3547,6 +3606,11 @@
       set_long_path_on_dirs(hlist);
     }
 
+    if (hlist == NULL) {
+      Debug0((dbg_fd, "Empty list\n"));
+      SETWORD(&(state->eax), NO_MORE_FILES);
+      return (FALSE);
+    }
     hlist_index = hlist_push(hlist, sda_cur_psp(sda));
     sdb_dir_entry(sdb) = hlist_index;
     firstfind = 1;
@@ -3612,6 +3676,10 @@
     }
     firstfind = 0;
     hlist_stack[hlist_index] = hlist;
+    if (hlist == NULL) {
+      Debug0((dbg_fd, "Last match\n"));
+      hlist_pop(hlist_index, sda_cur_psp(sda));
+    }
     return (TRUE);
 
   case FIND_NEXT:		/* 0x1c */

Reply via email to