Fix backward conditional in binfs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3433 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
7678f66537
commit
81507c53d7
@ -560,12 +560,6 @@ static int binfs_stat(struct inode *mountpt, const char *relpath, struct stat *b
|
||||
/* The requested directory must be the volume-relative "root" directory */
|
||||
|
||||
if (relpath && relpath[0] != '\0')
|
||||
{
|
||||
/* It's a read-only directory name */
|
||||
|
||||
buf->st_mode = S_IFDIR|S_IROTH|S_IRGRP|S_IRUSR|S_IXOTH|S_IXGRP|S_IXUSR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Check if there is a file with this name. */
|
||||
|
||||
@ -575,9 +569,15 @@ static int binfs_stat(struct inode *mountpt, const char *relpath, struct stat *b
|
||||
goto errout_with_semaphore;
|
||||
}
|
||||
|
||||
/* It's a read-only file name */
|
||||
/* It's a execute-only file name */
|
||||
|
||||
buf->st_mode = S_IFREG|S_IROTH|S_IRGRP|S_IRUSR|S_IXOTH|S_IXGRP|S_IXUSR;
|
||||
buf->st_mode = S_IFREG|S_IXOTH|S_IXGRP|S_IXUSR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* It's a read/execute-only directory name */
|
||||
|
||||
buf->st_mode = S_IFDIR|S_IROTH|S_IRGRP|S_IRUSR|S_IXOTH|S_IXGRP|S_IXUSR;
|
||||
}
|
||||
|
||||
/* File/directory size, access block size */
|
||||
|
Loading…
Reference in New Issue
Block a user