Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com To: cygwin-developers AT cygwin DOT com Subject: bugs in chdir()? Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: multipart/mixed; boundary="Multipart_Sun_Dec__3_12:47:39_2000-1" Content-Transfer-Encoding: 7bit From: Kazuhiro Fujieda Date: 03 Dec 2000 12:47:39 +0900 Message-ID: Lines: 66 X-Mailer: Gnus v5.3/Emacs 19.34 --Multipart_Sun_Dec__3_12:47:39_2000-1 Content-Type: text/plain; charset=US-ASCII Please look into the following sessions changing the current directory to C:\TEMP. Case 1. (No problem) $ cd /cygdrive/c/TEMP/ # Use POSIX style path with a trailing slash. $ pwd /cygdrive/c/TEMP # Good. Case 2. $ cd C:/TEMP/ # Use Win32 style path with a trailing slash. $ pwd /cygdrive/c/TEMP/ # The trailing slash is left illegally. Case 3. $ cd '\TEMP' # Use Win32 style path with a backslash. $ pwd /TEMP # No such directory. I think they are not bugs of chdir(), but bugs of the path conversions and revealed via chdir(). The strace logs are attached below. ____ | AIST Kazuhiro Fujieda | HOKURIKU School of Information Science o_/ 1990 Japan Advanced Institute of Science and Technology --Multipart_Sun_Dec__3_12:47:39_2000-1 Content-Type: text/plain; charset=US-ASCII Case 2. 449 99110 [main] a 477 chdir: dir C:/TEMP/ 259 99369 [main] a 477 mount_info::conv_to_win32_path: conv_to_win32_path (C:/TEMP/) 240 99609 [main] a 477 mount_info::conv_to_win32_path: C:/TEMP/ already win32 242 99851 [main] a 477 normalize_win32_path: C:\TEMP\ = normalize_win32_path (C:/TEMP/) 246 100097 [main] a 477 mount_info::conv_to_win32_path: C:\TEMP\(rel), C:\TEMP\(abs) 0x0(flags) = conv_to_win32_path (C:/TEMP/) 469 100566 [main] a 477 symlink_info::check: not a symlink 259 100825 [main] a 477 symlink_info::check: 0 = symlink.check (C:\TEMP, 0x240F3C9) (0x0) 534 101359 [main] a 477 path_conv::check: GetVolumeInformation(C:\) = OK, full_path(C:\TEMP), set_has_acls(8) 618 101977 [main] a 477 normalize_posix_path: src C:/TEMP/ 317 102294 [main] a 477 mount_info::conv_to_posix_path: conv_to_posix_path (C:/TEMP/, no-keep-rel, add-slash) 414 102708 [main] a 477 normalize_win32_path: C:\TEMP\ = normalize_win32_path (C:/TEMP/) 319 103027 [main] a 477 mount_info::conv_to_posix_path: /cygdrive/c/TEMP/ = conv_to_posix_path (C:/TEMP/) 271 103298 [main] a 477 chdir: 0 = chdir() cygcwd.posix '/cygdrive/c/TEMP/' native 'C:\TEMP' --Multipart_Sun_Dec__3_12:47:39_2000-1 Content-Type: text/plain; charset=US-ASCII Case 3. 446 97609 [main] a 329 chdir: dir \TEMP 232 97841 [main] a 329 mount_info::conv_to_win32_path: conv_to_win32_path (\TEMP) 247 98088 [main] a 329 mount_info::conv_to_win32_path: \TEMP already win32 228 98316 [main] a 329 normalize_win32_path: \TEMP = normalize_win32_path (\TEMP) 248 98564 [main] a 329 mount_info::conv_to_win32_path: \TEMP(rel), \TEMP(abs) 0x0(flags) = conv_to_win32_path (\TEMP) 429 98993 [main] a 329 symlink_info::check: not a symlink 271 99264 [main] a 329 symlink_info::check: 0 = symlink.check (\TEMP, 0x240F3D9) (0x0) 226 99490 [main] a 329 path_conv::check: GetVolumeInformation(\TEMP) = ERR, full_path(\TEMP), set_has_acls(FALSE) 797 100287 [main] a 329 normalize_posix_path: src \TEMP 316 100603 [main] a 329 mount_info::conv_to_posix_path: conv_to_posix_path (\TEMP, no-keep-rel, no-add-slash) 292 100895 [main] a 329 normalize_win32_path: \TEMP = normalize_win32_path (\TEMP) 244 101139 [main] a 329 mount_info::conv_to_posix_path: /TEMP = conv_to_posix_path (\TEMP) 277 101416 [main] a 329 chdir: 0 = chdir() cygcwd.posix '/TEMP' native '\TEMP' --Multipart_Sun_Dec__3_12:47:39_2000-1--