This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch]: Last path.cc


This should take care of the issues I listed yesterday evening.

I simply don't understand the logic in normalize_win32_path
well enough to touch it intelligently. 
So I removed the final . in the dumbest way possible

For example on line 946
  else if (strchr (src, ':') == NULL && *src != '/')
(why only '/' and not '\\')?
There is a "dst_start" and a "dst_root_start" that appear
to be the same. Perhaps one of them should prevent .. from 
going back to the drive or the unc prefix.

The code in normalize_posix_path looks much cleaner. It could 
perhaps be used here as well (reiterating a FIXME to that effect).

The other changes are minor.

Pierre

2004-04-11  Pierre Humblet <pierre.humblet@ieee.org>

	* path.cc (normalize_win32_path): Detect components with only dots.
	Remove a final . if it follows '\\'.
	(slash_unc_prefix_p): Remove redundant tests.
	(mount_info::conv_to_win32_path): Only backslashify the path
	when no mount is found.
	(chdir): Do not look for components with only dots.

Attachment: path.cc.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]