diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/filename.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 3bab2c8971..08bc79dfd2 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -440,6 +440,9 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, goto done; } + /* Stat failed - ensure we don't use it. */ + SET_STAT_INVALID(smb_fname->st); + if (errno == ENOENT) { /* Optimization when creating a new file - only the last component doesn't exist. */ @@ -506,9 +509,6 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, } } - /* Stat failed - ensure we don't use it. */ - SET_STAT_INVALID(smb_fname->st); - /* * Missing last component is ok - new file. * Also deal with permission denied elsewhere. |