Windows: cm_Rename break in 9cf7a628c2ff178b2fa236d2c0a41ca9be315036
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 28 Oct 2011 21:43:24 +0000 (17:43 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 28 Oct 2011 22:19:56 +0000 (15:19 -0700)
9cf7a628c2ff178b2fa236d2c0a41ca9be315036 broke renaming of
a file to a name that does not exist.  Put back the code that
makes that possible with a comment.

Change-Id: I6c13c0150d2366c9578502d0c8f6188bdc40a9c8
Reviewed-on: http://gerrit.openafs.org/5735
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/WINNT/afsd/cm_vnodeops.c

index 605ff31..0545350 100644 (file)
@@ -3607,6 +3607,9 @@ long cm_Rename(cm_scache_t *oldDscp, fschar_t *oldNamep, clientchar_t *cOldNamep
             newScp = NULL;
         } else if (code == CM_ERROR_AMBIGUOUS_FILENAME) {
             code = CM_ERROR_EXISTS;
+        } else {
+            /* The target does not exist.  Clear the error and perform the rename. */
+            code = 0;
         }
     }