* cygerrno.h: Revert previous patch.
* errno.cc: Ditto. * dir.cc: Eliminate `dir_suffixes'. (opendir): Remove usage of `dir_suffixes'. (rmdir): Ditto. * fhandler.cc (fhandler_disk_file::open): Remove usage of `inner_suffixes'. * path.cc: Rename `inner_suffixes' to `lnk_suffixes'. (path_conv::check): Remove usage of `inner_suffixes'. (symlink): Ditto. (symlink_info::check): Handle checking for `.lnk' in path_conv exclusively here. (chdir): Remove usage of `dir_suffixes'. * shortcut.c: Eliminate debug_printf lines. (check_shortcut): Don't set error except on failing ReadFile. * spawn.cc: Remove ".lnk" from `std_suffixes'. * syscalls.cc (_unlink): Remove usage of `inner_suffixes'. Remove ".lnk" from `stat_suffixes'. (_rename): Add check for renaming a symlink to keep the ".lnk" suffix after renaming.
This commit is contained in:
@@ -1199,13 +1199,11 @@ fhandler_disk_file::fhandler_disk_file (const char *name) :
|
||||
int
|
||||
fhandler_disk_file::open (const char *path, int flags, mode_t mode)
|
||||
{
|
||||
extern suffix_info inner_suffixes[];
|
||||
|
||||
syscall_printf ("(%s, %p)", path, flags);
|
||||
|
||||
/* O_NOSYMLINK is an internal flag for implementing lstat, nothing more. */
|
||||
path_conv real_path (path, (flags & O_NOSYMLINK) ?
|
||||
PC_SYM_NOFOLLOW : PC_SYM_FOLLOW, inner_suffixes);
|
||||
PC_SYM_NOFOLLOW : PC_SYM_FOLLOW);
|
||||
|
||||
if (real_path.error &&
|
||||
(flags & O_NOSYMLINK || real_path.error != ENOENT || !(flags & O_CREAT)))
|
||||
|
Reference in New Issue
Block a user