Skip to content
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

mkdir creates "null" folder. #23

Open
alinnert opened this issue Oct 24, 2012 · 2 comments
Open

mkdir creates "null" folder. #23

alinnert opened this issue Oct 24, 2012 · 2 comments

Comments

@alinnert
Copy link

I'm not sure if this is a bug in filer.js because it's kind of obvious:

When I use mkdir() it works fine, but inside the last folder there is another folder called "null". In filer.js (line ~553) there is an if-statement if(folders.length && folderParts.length != 1). If folders.length is 1 it's the last time createDir(dirEntry, folders.slice(1)) is going to be called. But the parameter folders.slice(1) removes the last element and calls createDir() with an empty array folders. Now folders[0] is undefined and I think that causes the "null"-folder - I just wonder why its name isn't undefined instead.
In addition that "null" folder is passed as parameter to successCallback function. So in successCallback this.name is null.
But it works for me when I change the line to if(folders.length > 1 && folderParts.length != 1).

Well, I saw someone submitted an issue about the mkdir function but it has been another problem. I wonder if that person didn't run into that problem or just hasn't noticed it. But wait, I'll check that issue again, maybe this is the reason for the other one...

@ebidel
Copy link
Owner

ebidel commented Mar 13, 2013

What is the exact call you're using? Is this when passing a path?

@alinnert
Copy link
Author

I don't remember exactly but from what I wrote I think this happened when I pass a path, yes. The function creates one folder after the other and in the end there is one too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants