Opening a file in a directory which doesn't exist returns
ERROR_FILE_NOT_FOUND instead of ERROR_PATH_NOT_FOUND.

diff --git a/files/dos_fs.c b/files/dos_fs.c
index 9541452..d7cfecf 100644
--- a/files/dos_fs.c
+++ b/files/dos_fs.c
@@ -824,16 +824,16 @@
 
     if (!found)
     {
-        if (check_last)
-        {
-            DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk );
-            return FALSE;
-        }
         if (*name)  /* Not last */
         {
             DOS_ERROR( ER_PathNotFound, EC_NotFound, SA_Abort, EL_Disk );
             return FALSE;
         }
+        if (check_last)
+        {
+            DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk );
+            return FALSE;
+        }
     }
     if (!full->long_name[0]) strcpy( full->long_name, "/" );
     if (!full->short_name[2]) strcpy( full->short_name + 2, "\\" );