Windows does not identify folders correctly in zip
See original GitHub issueI’m trying to extract https://github.com/HaxeFoundation/haxe/releases/download/3.2.1/haxe-3.2.1-win.zip using decompress 4.0.0, but get a whole bunch of errors like
Error: EISDIR: illegal operation on a directory, open '...\haxe-3.2.1\std\flash\geom'
at Error (native)
errno: -4068,
code: 'EISDIR',
syscall: 'open',
path: '...\haxe-3.2.1\std\flash\geom'
from file entries like
{ mode: 420,
mtime: 2015-10-11T11:00:44.000Z,
path: 'haxe-3.2.1/std/flash/geom/',
type: 'file',
data: <Buffer > }
It looks like the directories in that archive are marked as type: file (instead of directory), but oddly enough it only happens for that particular archive.
A quick fix I found was to treat files as directories if their path ends with a ‘/’ (i.e. if (x.type === 'directory' || x.path.endsWith('/')) { /* mkdir -p */ }
), but I don’t know if that’s a good idea or not.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
When I right click the blank in a folder, I can't find the choice
Hello, When I right click the blank in a folder, it is: There is no choice of "New compressed folder". What's the reason?...
Read more >Fix Exracted Files or Files Not Showing in Folder Windows 10
Here are four solutions for files not showing in folder or extracted files not showing up in Windows 10. Try it to retrieve...
Read more >Fix "Unable to Open ZIP Files in Windows 10" (One ... - YouTube
Can 't open zip files in Windows 10? You can fix the problem quite easily by following this simple method. Please let's know...
Read more >How to fix a directory that is there but doesn't exist? - Super User
Be sure to open the Zip file in Windows Explorer when you are extracting the contents so that Windows Explorer names the files...
Read more >Zip file is unreadable; cannot open zip file - NWEA Connection
Navigate to the folder location where the zip file was saved. · Right-click on the zip file and choose Open with... · Select...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FWIW I had success working around this using a filter
Worked like a charm, thanks!