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

path.join #66

Open
ghost opened this issue May 1, 2013 · 5 comments
Open

path.join #66

ghost opened this issue May 1, 2013 · 5 comments

Comments

@ghost
Copy link

ghost commented May 1, 2013

Currently helper.url uses path.join to build a uri. This doesn't work in windows as path.join uses the path.sep which is "" in windows. Urls then get built like http:\google.com\anotherpath\

http://nodejs.org/api/path.html
http://nodejs.org/api/path.html#path_path_sep

@ghost
Copy link
Author

ghost commented May 2, 2013

The general consensus is that path.join should be avoided for building uri's

nodejs/node-v0.x-archive#2216

@ghost
Copy link
Author

ghost commented May 2, 2013

I created the following pull request if you would like to take on this fix.

#67

@paultanner
Copy link

I was getting the same error with node v0.10.7 on a Mac (Snow Leopard)
I applied your fix to see if it would help.
It fixed the call to client.account :-)
However, I get a status 400 and an empty array back from client.readdir (with parameter "Finse")
(That folder has several files in it)
Checking the fullpath I see this: api.dropbox.com/1/metadata/sandbox/undefinedFinse
This tells me that the scopepath is undefined.
Thought you might know how to find the cause of this?
I also wondered if your fix might have a slash missing?
Thx. Paul

@sintaxi
Copy link
Owner

sintaxi commented Jun 19, 2013

Gents, sorry I have been inactive on this issue.

I'm not a fan of removing the path.join with string concatenation as it doesn't handle double slashes and things like that. I would like to have something more robust (ideally that supports both platforms).

@paultanner @definitelycarter are you guys both running dbox on windows?

@paultanner
Copy link

I am using a mac osx (snow leopard) node v0.10.7.
Planning to move to debian linux when this is
working. the app instance I created at dbox is still in sandbox mode.

I appreciate that the suggested fix was intended
for Windows folks. I thought it worth trying as
I was getting the exact same error message.

** on further investigation **

The version in the NPM repo worked without a change on debian linux.
My problem (status 400s above) is unrelated to this issue.
However, my experience seems to confirm that path.join problem exists on OS/X.

Paul

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