summaryrefslogtreecommitdiff
path: root/trans/fakeroot.c
diff options
context:
space:
mode:
Diffstat (limited to 'trans/fakeroot.c')
-rw-r--r--trans/fakeroot.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 1ab32167..6e3b5d4b 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -267,6 +267,14 @@ netfs_S_dir_lookup (struct protid *diruser,
goto redo_lookup;
case FS_RETRY_NORMAL:
+ if (retry_name[0] != '\0')
+ {
+ dir = file;
+ filename = retry_name;
+ goto redo_lookup;
+ }
+ break;
+
case FS_RETRY_MAGICAL:
default:
if (file == MACH_PORT_NULL)
@@ -305,10 +313,6 @@ netfs_S_dir_lookup (struct protid *diruser,
/* We already know about this node. */
mach_port_deallocate (mach_task_self (), idport);
pthread_mutex_lock (&np->lock);
- if (retry_name[0] != '\0')
- /* This was not the last component, remove O_WRITE to
- avoid opening directories with it. */
- flags &= ~O_WRITE;
err = check_openmodes (np->nn, (flags & (O_RDWR|O_EXEC)), file);
if (!err)
netfs_nref (np);