aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote-fileio.c')
-rw-r--r--gdb/remote-fileio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
index 7338b97..68298e7 100644
--- a/gdb/remote-fileio.c
+++ b/gdb/remote-fileio.c
@@ -31,6 +31,7 @@
#include "remote-fileio.h"
#include "event-loop.h"
#include "target.h"
+#include "filenames.h"
#include <fcntl.h>
#include <sys/time.h>
@@ -1020,8 +1021,8 @@ remote_fileio_func_rename (char *buf)
cygwin_conv_path (CCP_WIN_A_TO_POSIX, newpath, newfullpath,
PATH_MAX);
len = strlen (oldfullpath);
- if (newfullpath[len] == '/'
- && !strncmp (oldfullpath, newfullpath, len))
+ if (IS_DIR_SEPARATOR (newfullpath[len])
+ && !filename_ncmp (oldfullpath, newfullpath, len))
errno = EINVAL;
else
errno = EEXIST;