Arreglar error de test

This commit is contained in:
Miguel González Aravena 2017-08-15 04:34:00 -03:00
parent 49f1bf03dc
commit c0b546aa95
1 changed files with 2 additions and 2 deletions
lib/providers/filesystem

View File

@ -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)) {