diff --git a/lib/providers/filesystem/index.js b/lib/providers/filesystem/index.js index 3d21f83..5a8870c 100644 --- a/lib/providers/filesystem/index.js +++ b/lib/providers/filesystem/index.js @@ -125,7 +125,7 @@ FileSystemProvider.prototype.getContainers = function(cb) { FileSystemProvider.prototype.createContainer = function(options, cb) { var self = this; var name = options.name; - var hasSlash = (typeof name == 'string' ? name.search('%2F') : false); + var hasSlash = name.search('%2F'); name = (hasSlash != -1 ? name.replace(/%2F/gi, '/') : name); var dir = path.join(this.root, name); @@ -185,7 +185,7 @@ FileSystemProvider.prototype.getContainer = function(containerName, cb) { // File related functions FileSystemProvider.prototype.upload = function(options, cb) { var container = options.container; - var hasSlash = (typeof container == 'string' ? container.search('%2F') : false); + var hasSlash = container.search('%2F'); container = (hasSlash != -1 ? container.replace(/%2F/gi, '/') : container); var file = options.remote; if (!validateName(file)) {