dropbox/dropbox-js — pull request #82 by ayush-j (2013-06-05 23:06:14+00:00)
Title: Encode tilde character (~) in Dropbox paths

In node.js (and I'm guessing in browser too), readFile, writeFile, stat etc methods currently fail with the following errors if the path contains a tilde character:

```javascript
> dropbox.readFile('test/file~name.txt', function(err, data){ console.log(err, data); })
Dropbox API error 403 from GET https://api-content.dropbox.com/1/files/sandbox/test/file~name.txt :: {"error": "Invalid or missing signature"}

> dropbox.writeFile('test/file~name.txt', 'foobar', function(err, data){ console.log(err, data); })
Dropbox API error 403 from POST https://api-content.dropbox.com/1/files_put/sandbox/test~a/filename.txt :: {"error": "Invalid or missing signature"}

> dropbox.stat('test/file~name.txt', function(err, data){ console.log(err, data); })
Dropbox API error 403 from GET https://api.dropbox.com/1/metadata/sandbox/test/file~name.txt?include_deleted=false&list=false :: {"error": "Invalid or missing signature"}
```

This commit makes it so that it gets encoded which fixes the issue.