mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(vfs_s_open): reuse variable for directory name and file name.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
c62d651ee3
commit
6e8e55ed05
@ -1318,7 +1318,7 @@ vfs_s_open (const vfs_path_t * vpath, int flags, mode_t mode)
|
|||||||
|
|
||||||
if (ino == NULL)
|
if (ino == NULL)
|
||||||
{
|
{
|
||||||
char *dirname, *name;
|
char *name;
|
||||||
struct vfs_s_entry *ent;
|
struct vfs_s_entry *ent;
|
||||||
struct vfs_s_inode *dir;
|
struct vfs_s_inode *dir;
|
||||||
|
|
||||||
@ -1326,9 +1326,9 @@ vfs_s_open (const vfs_path_t * vpath, int flags, mode_t mode)
|
|||||||
if ((flags & O_CREAT) == 0 || path_element->class->write == NULL)
|
if ((flags & O_CREAT) == 0 || path_element->class->write == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dirname = g_path_get_dirname (q);
|
name = g_path_get_dirname (q);
|
||||||
dir = vfs_s_find_inode (path_element->class, super, dirname, LINK_FOLLOW, FL_DIR);
|
dir = vfs_s_find_inode (path_element->class, super, name, LINK_FOLLOW, FL_DIR);
|
||||||
g_free (dirname);
|
g_free (name);
|
||||||
if (dir == NULL)
|
if (dir == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user