diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-04-13 16:47:21 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-04-13 16:47:21 +0000 |
commit | 9bf7c7e96cf97fb10054775cfc84a92b4f45dea0 (patch) | |
tree | d528c007b7748d18400c7cec4ee9fa20665e9f9d /winsup/cygwin/path.cc | |
parent | a7ff2096f7f5ca58a2ea202033a579675e695199 (diff) | |
download | cygnal-9bf7c7e96cf97fb10054775cfc84a92b4f45dea0.tar.gz cygnal-9bf7c7e96cf97fb10054775cfc84a92b4f45dea0.tar.bz2 cygnal-9bf7c7e96cf97fb10054775cfc84a92b4f45dea0.zip |
* fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Simplify
code which checks for symlinks. Fix problem with UNC paths.
* environ.cc (struct parse_thing): Remove transparent_exe option.
* syscalls.cc (transparent_exe): Remove.
(unlink): Always add stat_suffixes, drop transparent_exe check.
(open): Ditto.
(link): Ditto.
(pathconf): Ditto.
* fhandler_disk_file.cc (fhandler_disk_file::link): Ditto.
* fhandler_process.cc (fhandler_process::fill_filebuf): Always remove
.exe suffix.
* path.cc (realpath): Never attach known_suffix.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 0b94890b1..c44a932cb 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2872,25 +2872,13 @@ realpath (const char *path, char *resolved) if (!real_path.error && real_path.exists ()) { - /* Check for the suffix being tacked on. */ - int tack_on = 0; - if (!transparent_exe && real_path.known_suffix) - { - char *c = strrchr (real_path.normalized_path, '.'); - if (!c || !ascii_strcasematch (c, real_path.known_suffix)) - tack_on = strlen (real_path.known_suffix); - } - if (!resolved) { - resolved = (char *) malloc (strlen (real_path.normalized_path) - + tack_on + 1); + resolved = (char *) malloc (strlen (real_path.normalized_path) + 1); if (!resolved) return NULL; } strcpy (resolved, real_path.normalized_path); - if (tack_on) - strcat (resolved, real_path.known_suffix); return resolved; } |