diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-03-12 21:54:24 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-03-12 21:54:24 +0300 |
commit | 0f7ac147bd6d1472cc0fff7c7e206abf34712e19 (patch) | |
tree | ef885aabcde998bf951f7316f7f6dbd7f9b0687b /winsup/cygwin/syscalls.cc | |
parent | 48726c8a06516a793377355303c2f9a22bf8ad07 (diff) |
* syscalls.cc (rename): Just return with 0 if filenames are identical,
per POSIX. Drop comment added in previous patch.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 548e2c66f..337d50282 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1573,17 +1573,14 @@ rename (const char *oldpath, const char *newpath) /* First check if oldpath and newpath only differ by case. If so, it's just a request to change the case of the filename. By simply setting the file attributes to INVALID_FILE_ATTRIBUTES (which translates to - "file doesn't exist"), all later tests are skipped. - If not, it's a request to change the case of the name of a mount - point. If we don't catch this here, the underlying directory would - be deleted, if it happens to be empty. */ + "file doesn't exist"), all later tests are skipped. */ if (newpc.exists () && equal_path) { if (RtlEqualUnicodeString (oldpc.get_nt_native_path (), newpc.get_nt_native_path (), FALSE)) { - set_errno (EACCES); + res = 0; goto out; } newpc.file_attributes (INVALID_FILE_ATTRIBUTES); |