*** empty log message ***
[yaffs/.git] / direct / yaffsfs.c
index d3eae30e1969d664d96b5923a14887677917536f..8f2f06e82ff7f0cefc71a645fa3a21ee84d528ca 100644 (file)
@@ -25,7 +25,7 @@
 #endif
 
 
-const char *yaffsfs_c_version="$Id: yaffsfs.c,v 1.1 2003-01-21 03:32:17 charles Exp $";
+const char *yaffsfs_c_version="$Id: yaffsfs.c,v 1.2 2003-01-31 00:57:35 charles Exp $";
 
 // configurationList is the list of devices that are supported
 static yaffsfs_DeviceConfiguration *yaffsfs_configurationList;
@@ -424,7 +424,13 @@ int yaffs_open(const char *path, int oflag, int mode)
                {
                        // Let's see if we can create this file
                        dir = yaffsfs_FindDirectory(NULL,path,&name,0);
-                       obj = yaffs_MknodFile(dir,name,mode,0,0);       
+                       if(dir)
+                       {
+                               obj = yaffs_MknodFile(dir,name,mode,0,0);       
+                       }
+                       else
+                       {
+                       } yaffsfs_SetError(-ENOTDIR);
                }
                
                if(obj && !openDenied)