delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/12/02/22:49:03

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
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)
From: Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
Date: 03 Dec 2000 12:47:39 +0900
Message-ID: <s1sbsuucgis.fsf@jaist.ac.jp>
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 <fujieda AT jaist DOT ac DOT jp>
  | 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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019