From 2a664807c53c2af335b1473bfef1a03071e4852c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 2 Apr 2002 19:34:36 +0000 Subject: Fixed the error bad path for recursive mkdir so mkdir \a\b\c\d works. Forward ported some of the code tidyups from 2.2. Jeremy. (This used to be commit 2475c09b354cc7b5f4ce384e4497207d30f619bb) --- source3/smbd/trans2.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source3/smbd/trans2.c') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index aca7e47d48..ca8ad5fa79 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1412,6 +1412,20 @@ static int call_trans2setfsinfo(connection_struct *conn, return outsize; } +/**************************************************************************** + * Utility function to set bad path error. + ****************************************************************************/ + +NTSTATUS set_bad_path_error(int err, BOOL bad_path) +{ + if((err == ENOENT) && bad_path) { + unix_ERR_class = ERRDOS; + unix_ERR_code = ERRbadpath; + return NT_STATUS_OBJECT_PATH_NOT_FOUND; + } + return NT_STATUS_OK; +} + /**************************************************************************** Reply to a TRANS2_QFILEPATHINFO or TRANSACT2_QFILEINFO (query file info by file name or file id). -- cgit