| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| Message-ID: | <20000906164351.27048.qmail@web114.yahoomail.com> |
| Date: | Wed, 6 Sep 2000 09:43:51 -0700 (PDT) |
| From: | Earnie Boyd <earnie_boyd AT yahoo DOT com> |
| Subject: | Re: tar -C dir option makes dir relative to current dir |
| To: | Jon Mountjoy <mountjoy AT netcomuk DOT co DOT uk>, cygwin AT sourceware DOT cygnus DOT com |
| MIME-Version: | 1.0 |
--- Jon Mountjoy <mountjoy AT netcomuk DOT co DOT uk> wrote:
> 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.
>
As I see it, tar is assuming the j:/foobar is a relative path since the string
doesn't begin with /. This causes the prefix /cygdrive/l/foo to be added to
make the path absolute.
If you:
mkdir /j
mount -b j:/ /j
tar -C /j/foobar
then tar will see the string beginning with / and not make the false assumption
that the path isn't absolute.
The other option is to modify tar and submit the patches to
cygwin-apps AT soures DOT redhat DOT com for consideration.
Cheers,
=====
--- <http://earniesystems.safeshopper.com> ---
Earnie Boyd: <mailto:earnie_boyd AT yahoo DOT com>
__Cygwin: POSIX on Windows__
Cygwin Newbies: <http://gw32.freeyellow.com/>
__Minimalist GNU for Windows__
Mingw32 List: <http://www.egroups.com/group/mingw32/>
Mingw Home: <http://www.mingw.org/>
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |