Mail Archives: cygwin/1997/07/13/09:23:17
In wstd.mail.gnu-win32, you wrote:
> Tim Newsham <newsham AT aloha DOT net> writes:
>
> >- cygwin does not properly transform command line path names across
> > mount points. If I am on drive "D:" and type "vi /tmp/foo",
> > I end up editing "D:\tmp\foo" and not "C:\tmp\foo" even though
> > "/tmp" is on "C:". (vi is not compiled with cygwin).
> > Cygwin should transform the path to "C:\tmp\foo" for the benefit
> > of non-cygwin applications.
>
> How can cygwin know which arguments are pathnames and which are
> just ordinary strings that should not be transformed in this manner?
Cygwin can know because the strings that are pathnames are passed to
open(), at which point cygwin looks in the mount table to find what
drive-and-directory the pathname actually refers to. For example,
given this mount table:
% mount
Device Directory Type Flags
\temp /tmp native no-mixed,text=binary
c: / native no-mixed,text=binary
....
Then the pathname "/tmp" refers to c:\temp regardless of my current
drive. Since vi uses open() to access the file, then the command "vi
/tmp/foo" must open c:\temp\foo regardless of which drive is my
currect drive.
--
Francis Litterio PGP Key Fingerprint:
franl AT world DOT std DOT omit-this DOT com 02 37 DF 6C 66 43 CD 2C
http://world.std.omit-this.com/~franl/ 10 C8 B5 8B 57 34 F3 21
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -- Ben Franklin, ~1784
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -