Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 456cf216232cc3e7515dc836d78f9a33038d8d82 Mon Sep 17 00:00:00 2001
- From: John Peterson <john.peterson3@hotmail.com>
- Date: Mon, 21 May 2012 22:55:39 -0700
- Subject: [PATCH] Changed nfsd-rename return value when destination directory exist from nfserr-io to nfserr-notempty.
- The client commands 'mv' and 'mv -f' should return notempty when the destination directory exist.
- ---
- nfs.cl | 6 +++++-
- 1 files changed, 5 insertions(+), 1 deletions(-)
- diff --git a/nfs.cl b/nfs.cl
- index 6e167c1..b018d4a 100644
- --- a/nfs.cl
- +++ b/nfs.cl
- @@ -1347,11 +1347,15 @@ struct entry {
- (tofh (lookup-fh-in-dir todirfh tofilename))
- ;; Use name provided by client (in case of hard link)
- (to (add-filename-to-dirname (fh-pathname todirfh)
- - tofilename)))
- + tofilename))
- + ;; See if the destination is a directory.
- + (tofa (GetFileAttributes to)))
- (if* (or
- (eq (close-open-file fromfh :check-refcount t) :still-open)
- (eq (close-open-file tofh :check-refcount t) :still-open))
- then (xdr-int *nfsdxdr* #.*nfserr-perm*)
- + elseif (and tofh (not (zerop (logand tofa FILE_ATTRIBUTE_DIRECTORY))))
- + then (xdr-int *nfsdxdr* #.*nfserr-notempty*)
- else #+ignore
- (format t "~%rename ~a~%" fromfh)
- ;; This will auto-delete any existing destination
Add Comment
Please, Sign In to add comment