-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed exception in archive consumer. #610
Fixed exception in archive consumer. #610
Conversation
Hey there, I'm afraid this isn't really fixing the underlying issue. You see, the way the filesystem API works is that it normalises path separators the first time a resource is referenced, freeing all other functions to assume forward slashes in paths are being used. So the real problem is somewhere along the lines, separators aren't being normalised like they should be. Could I trouble you to email me the ZIP file (or something with an analogous structure)? |
I found the problem and tested the fix using one of the test files in Is this what you need? |
The source of backslashes is here (package |
Nope, no idea. But I'm looking into this to see what the real issue is. I doubt the solution is as simple as using |
@konstantin-popov Never mind. I forgot what I wrote |
lib/consumers/archive-view.js
Outdated
@@ -1,5 +1,6 @@ | |||
"use strict"; | |||
|
|||
const pathModule = require("path"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please use this instead?
const {sep} = require("path");
Thanks! |
@Alhadis, after what I have seen in |
Yes, don't worry. My normal system is running macOS; I tested your earlier fix with a VirtualBox install of Windows 7. Both platforms are functioning fine, it would seem. =) Note that the |
BTW, all of this ugly code will be washed away once/if the Atom team merges |
Thanks for your explanation! I thought something like this when looking at |
Yeah, haha. =) In fact, the entire |
The package throws exception on Windows when archive-view uses it in archive with nested files/directories.
Not sure if importing
path
is ok here or it should go somewhere in Atom-FS package for abstraction.