diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-04-12 21:21:37 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-04-12 21:21:37 +0000 |
commit | 70c370d674c5696d39e64970300c889c64ecd752 (patch) | |
tree | 310510f16858e53d6f08f6bab19d744d66469183 /winsup/cygwin/fhandler.cc | |
parent | b8a8c59d33d5df1dbd709d6e340c250faa4ebf7b (diff) | |
download | cygnal-70c370d674c5696d39e64970300c889c64ecd752.tar.gz cygnal-70c370d674c5696d39e64970300c889c64ecd752.tar.bz2 cygnal-70c370d674c5696d39e64970300c889c64ecd752.zip |
* dir.cc (mkdir): Check for case clash.
* environ.cc: Add extern declaration for `pcheck_case'.
(check_case_init): New function.
(struct parse_thing): Add "check_case" option.
* errno.cc (_sys_nerrlist): Add text for ECASECLASH.
(strerror): Add case branch for ECASECLASH.
* fhandler.cc (fhandler_disk_file::open): Check for case clash.
* path.cc: Add global variable `pcheck_case'.
(struct symlink_info): Add member `case_clash' and method `case_check'.
(path_prefix_p_): Call `pathnmatch' instead of `strncasematch'.
(pathnmatch): New funtion.
(pathmatch): Ditto.
(path_conv::check): Add handling for case checking.
(symlink): Check for case clash.
(symlink_info::check): Add parameter for case checking.
Handle case checking.
(symlink_info::case_check): New method.
(chdir): Don't use unconverted path if pcheck_case==PCHECK_STRICT.
* path.h: Add extern declarations for `pathmatch' and
`pathnmatch'.
(enum case_checking): New enumeration type describing
the case checking behaviour of path conversion routines.
(class path_conv): Add member `case_clash'.
* syscalls.cc (_link): Check for case clash.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 73fe3f554..ff9a9dfb4 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1208,9 +1208,11 @@ fhandler_disk_file::open (const char *path, int flags, mode_t mode) PC_SYM_NOFOLLOW : PC_SYM_FOLLOW); if (real_path.error && - (flags & O_NOSYMLINK || real_path.error != ENOENT || !(flags & O_CREAT))) + (flags & O_NOSYMLINK || real_path.error != ENOENT + || !(flags & O_CREAT) || real_path.case_clash)) { - set_errno (real_path.error); + set_errno (flags & O_CREAT && real_path.case_clash ? ECASECLASH + : real_path.error); syscall_printf ("0 = fhandler_disk_file::open (%s, %p)", path, flags); return 0; } |