summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/ntvfs/posix/pvfs_unlink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/ntvfs/posix/pvfs_unlink.c b/source4/ntvfs/posix/pvfs_unlink.c
index 8dbf9ee724..2b96a5032c 100644
--- a/source4/ntvfs/posix/pvfs_unlink.c
+++ b/source4/ntvfs/posix/pvfs_unlink.c
@@ -34,10 +34,6 @@ static NTSTATUS pvfs_unlink_stream(struct pvfs_state *pvfs,
{
NTSTATUS status;
- if (!name->stream_exists) {
- return NT_STATUS_OBJECT_NAME_NOT_FOUND;
- }
-
/* make sure its matches the given attributes */
status = pvfs_match_attrib(pvfs, name,
unl->unlink.in.attrib, 0);
@@ -135,6 +131,10 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
}
if (name->stream_name) {
+ if (!name->stream_exists) {
+ return NT_STATUS_OBJECT_NAME_NOT_FOUND;
+ }
+
return pvfs_unlink_stream(pvfs, req, unl, name);
}