summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/lib/atexit.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-07-11 20:14:00 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-11-16 19:34:58 -0800
commitafd8d80e47348105616c8c411029c4ec0361d0ba (patch)
tree47d83d5386f666eb8bf0d6bf3a65f8009ebaffc1 /winsup/cygwin/lib/atexit.c
parentf29fa1383145a57751aefff11699cc76138fb01a (diff)
downloadcygnal-afd8d80e47348105616c8c411029c4ec0361d0ba.tar.gz
cygnal-afd8d80e47348105616c8c411029c4ec0361d0ba.tar.bz2
cygnal-afd8d80e47348105616c8c411029c4ec0361d0ba.zip
Implement drive-relative paths and per-drive working dir.
* winsup/cygwin/path.cc (normalize_win32_path): When a drive-relative path is normalized, look up the remembered working directory of that drive in the environment. A drive-relative path is, for example, "C:file.txt". Or just "C:", with no component. If there is no path for the drive in the environment, then the root directory is used, and the "C:" part thus becomes "C:\", causing the path to refer to "C:\file.txt". Otherwise the path is inserted, with a backslash, like "C:\users\bob\file.txt". The Windows convention for storing these per-drive paths in the environment is to use environment variables based on drive letters. For instance the path for the C drive is stored in the environment variable "!C:" (bang, letter, colon). The path includes the C:\ prefix. (cwdstuff::override_win32_cwd): Add the behavior of associating the current working directory with its drive (if it is a current working directory based on a drive). For instance if the overriding cwd is "C:\Users", then the "C:\Users" path is stored into the "!C:" environment variable.
Diffstat (limited to 'winsup/cygwin/lib/atexit.c')
0 files changed, 0 insertions, 0 deletions