diff options
author | Johannes Zellner <johannes@nebulon.de> | 2016-03-01 12:42:13 +0100 |
---|---|---|
committer | Johannes Zellner <johannes@nebulon.de> | 2016-03-01 12:42:13 +0100 |
commit | d755925f749b88157e0935a7fa3c3ed94480292e (patch) | |
tree | 086d32ac5290cd2c92567ff383bf68d3660c5336 /cli | |
parent | 24545229fc52aa6d948f9081472e65c7f17eaa14 (diff) | |
download | Surfer-d755925f749b88157e0935a7fa3c3ed94480292e.tar.gz Surfer-d755925f749b88157e0935a7fa3c3ed94480292e.tar.zst Surfer-d755925f749b88157e0935a7fa3c3ed94480292e.zip |
Properly check for absolute file paths
Diffstat (limited to 'cli')
-rw-r--r-- | cli/actions.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cli/actions.js b/cli/actions.js index 59f0714..d10e154 100644 --- a/cli/actions.js +++ b/cli/actions.js | |||
@@ -187,6 +187,7 @@ function del(filePath) { | |||
187 | superagent.del(config.server() + API + relativeFilePath).query(gQuery).end(function (error, result) { | 187 | superagent.del(config.server() + API + relativeFilePath).query(gQuery).end(function (error, result) { |
188 | if (error && error.status === 401) return console.log('Login failed'); | 188 | if (error && error.status === 401) return console.log('Login failed'); |
189 | if (error && error.status === 404) return console.log('No such file or directory'); | 189 | if (error && error.status === 404) return console.log('No such file or directory'); |
190 | if (error && error.status === 403) return console.log('No such file or directory'); | ||
190 | if (error) return console.log('Failed', result ? result.body : error); | 191 | if (error) return console.log('Failed', result ? result.body : error); |
191 | 192 | ||
192 | console.log('Success. Removed %s files.', result.body.entries.length); | 193 | console.log('Success. Removed %s files.', result.body.entries.length); |