[issue27318] Add support for symlinks to zipfile

2016-06-14 Thread Lukáš Doktor

New submission from Lukáš Doktor:

Currently the zipfile library extracts all files as simple files, even though 
it contains the information of the file attributes. This patch uses them to 
detect if the original file was a symlink and creates it when there is a 
support for symlink creation.

--
components: Library (Lib)
files: zipfile-symlink.patch
keywords: patch
messages: 268552
nosy: ldoktor
priority: normal
severity: normal
status: open
title: Add support for symlinks to zipfile
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file43388/zipfile-symlink.patch

___
Python tracker 
<http://bugs.python.org/issue27318>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27318] Add support for symlinks to zipfile

2016-06-15 Thread Lukáš Doktor

Lukáš Doktor added the comment:

Hello Eryk,

thank you for the prompt response. I have only checked that using python2.6 on 
`wine` and there was no `os.symlink` support there. I'm not sure how to 
reasonably handle the `dir` flag for Windows as theoretically the symlink can 
point out of the zip file.

Do you know what happens when the symlink `dir` flag is set inappropriately? I 
guess it silently continues, but the link wont work, right?

Well I added the `except OSError` part, please let me know, whether this 
version is acceptable. The situation could only be better as without this patch 
both OSs are stuck with text files instead of symlinks, this way at least on 
Linux it should work properly.

--
Added file: http://bugs.python.org/file43399/zipfile-symlink.patch

___
Python tracker 
<http://bugs.python.org/issue27318>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com