Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104025
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | crankypuss <invalid@invalid.invalid> |
| Newsgroups | comp.lang.python |
| Subject | Re: creating zipfile with symlinks |
| Date | Fri, 04 Mar 2016 04:03 -0700 |
| Organization | see-sig |
| Lines | 22 |
| Message-ID | <nbbprf$heq$1@dont-email.me> (permalink) |
| References | <mailman.158.1457030287.20602.python-list@python.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="ISO-8859-1" |
| Content-Transfer-Encoding | 7Bit |
| Injection-Date | Fri, 4 Mar 2016 11:00:00 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="c8c8ae06929b24fa1f2b5ab6c91d4e8d"; logging-data="17882"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uIAqkVi9i6Y9eDFGZtzyDjrcOY5KXQyQ=" |
| User-Agent | KNode/4.14.1 |
| Cancel-Lock | sha1:OoHlJUP7xgSzvV59K2iToNGrwOk= |
| Xref | csiph.com comp.lang.python:104025 |
Show key headers only | View raw
Larry Martell wrote: > I have a script that creates zip files of dirs containing symlinks. I > was surprised to find that the zipfiles have zipped the targets of the > links as opposed to the links themselves, which is what I wanted and > expected. Googling I found this: > > https://doeidoei.wordpress.com/2010/11/23/compressing-files-with-python-symlink-trouble/ > > Which I don't love as a solution. Anyone know a cleaner way to get > zipfile to zip the links? I don't even know what "zipfile" is, is that a Windows command? On linux the tar command's --dereference option causes the behavior you describe, which is not its default. Not sure if this is applicable to your situation, or not: http://www.gnu.org/software/tar/manual/html_node/dereference.html -- http://totally-portable-software.blogspot.com [Mon Feb 29: "Addresses - What Good Are They?"]
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
creating zipfile with symlinks Larry Martell <larry.martell@gmail.com> - 2016-03-03 13:37 -0500
Re: creating zipfile with symlinks crankypuss <invalid@invalid.invalid> - 2016-03-04 04:03 -0700
Re: creating zipfile with symlinks Tim Golden <mail@timgolden.me.uk> - 2016-03-04 11:12 +0000
Re: creating zipfile with symlinks Grant Edwards <invalid@invalid.invalid> - 2016-03-04 15:56 +0000
Re: creating zipfile with symlinks crankypuss <invalid@invalid.invalid> - 2016-03-04 11:50 -0700
Re: creating zipfile with symlinks Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-04 13:31 -0700
Re: creating zipfile with symlinks Wildman <best_lay@yahoo.com> - 2016-03-04 20:12 -0600
csiph-web