Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P736
shutil.unpack_archive drops executable bits
Active
Public
Actions
Authored by
vlorentz
on Aug 5 2020, 7:14 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
$ touch foo
$ chmod a+x foo
$ zip archive.zip foo
adding: foo (stored 0%)
$ zipinfo archive.zip
Archive: archive.zip
Zip file size: 156 bytes, number of entries: 1
-rwxr-xr-x 3.0 unx 0 bx stor 20-Aug-05 19:11 foo
1 file, 0 bytes uncompressed, 0 bytes compressed: 0.0%
$ rm foo
$ unzip archive.zip
Archive: archive.zip
extracting: foo
$ ls -l foo
-rwxr-xr-x 1 vlorentz vlorentz 0 Aug 5 19:11 foo
$ rm foo
$ python3 -c "import shutil; shutil.unpack_archive('archive.zip')"
$ ls -l foo
-rw-r--r-- 1 vlorentz vlorentz 0 Aug 5 19:12 foo
Event Timeline
vlorentz
created this paste.
Aug 5 2020, 7:14 PM
2020-08-05 19:14:18 (UTC+2)
Log In to Comment