This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
RE: tar -C dir option makes dir relative to current dir
- To: Bernard Dautrevaux <Dautrevaux at microprocess dot com>, 'Jon Mountjoy' <mountjoy at netcomuk dot co dot uk>, "'cygwin at sourceware dot cygnus dot com'" <cygwin at sourceware dot cygnus dot com>
- Subject: RE: tar -C dir option makes dir relative to current dir
- From: Bernard Dautrevaux <Dautrevaux at microprocess dot com>
- Date: Wed, 6 Sep 2000 18:07:08 +0200
> -----Original Message-----
> From: Bernard Dautrevaux
> Sent: Wednesday, September 06, 2000 6:05 PM
> To: 'Jon Mountjoy'; cygwin@sourceware.cygnus.com
> Subject: RE: tar -C dir option makes dir relative to current dir
>
>
> > -----Original Message-----
> > From: Jon Mountjoy [mailto:mountjoy@netcomuk.co.uk]
> > Sent: Wednesday, September 06, 2000 4:38 PM
> > To: cygwin@sourceware.cygnus.com
> > Subject: tar -C dir option makes dir relative to current dir
> >
> >
> > Hi All,
> >
> > I have read all docs and couldn't solve my problem. In a
> > make file I have:
> > cd foo && tar blah blah | tar -C j:/foobar
> >
> > Now I run the make file from the l: drive (so l:/foo exists).
> >
> > The problem is that when the tar on the right gets run, it
> > tries to place
> > the files in the directory:
> > /cygdrive/l/foo/j:/foobar
> > which of course isn't a valid directory.
> >
> > I know I can solve it by not going over another filesystem,
> > but that isn't
> > ideal.
> >
> > Any ideas? (I am running latest net release on W2K. l: and
> > j: are mapped
> > drives. I also tried mounting them, didn't solve a thing.
> > WinNT Ver 5.0
> > build 2195,
> > Cygwin DLL version i dll major: 1001 dll minor: 4
> > dll epoch: 19)
>
>
> Did you try "... | tar -C /cygdrive/j/foobar" ?
>
> The problem here is that for TAR (except if especially
> changed for cygwin) j:/foobar is a *relative* path name, not
> an absolute one (it does not start by a '/') :-(
>
> The cygwin /cygdrive feature is just for that :-)
>
Just forgot to say, sending faster than thinking :-): you can use cygpath to
automatically convert to/from DOS paths so that you have no problems like
this one.
HTH
Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: dautrevaux@microprocess.com
b.dautrevaux@usa.net
--------------------------------------------
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com