Fix backward conditional in binfs
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3433 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
parent
aa1599c285
commit
9ccf031808
|
@ -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