@@ -202,8 +202,8 @@ module.exports.bulkRemoveTags = function(fileIdArray, tags, defaultOptions, call
202202*/
203203module . exports . copyFile = function ( sourceFilePath , destinationPath , defaultOptions , callback ) {
204204
205- if ( sourceFilePath . length === 0 || typeof ( sourceFilePath ) !== 'string'
206- || destinationPath . length === 0 || typeof ( destinationPath ) !== 'string' ) {
205+ if ( typeof ( destinationPath ) !== 'string' || typeof ( sourceFilePath ) !== 'string'
206+ || destinationPath . length === 0 || sourceFilePath . length === 0 ) {
207207 respond ( true , errorMessages . INVALID_DIRECTORY_PATH , callback ) ;
208208 return ;
209209 }
@@ -227,8 +227,8 @@ module.exports.copyFile = function(sourceFilePath, destinationPath, defaultOptio
227227*/
228228module . exports . moveFile = function ( sourceFilePath , destinationPath , defaultOptions , callback ) {
229229
230- if ( sourceFilePath . length === 0 || typeof ( sourceFilePath ) !== 'string'
231- || destinationPath . length === 0 || typeof ( destinationPath ) !== 'string' ) {
230+ if ( typeof ( destinationPath ) !== 'string' || typeof ( sourceFilePath ) !== 'string'
231+ || destinationPath . length === 0 || sourceFilePath . length === 0 ) {
232232 respond ( true , errorMessages . INVALID_DIRECTORY_PATH , callback ) ;
233233 return ;
234234 }
@@ -252,8 +252,8 @@ module.exports.moveFile = function(sourceFilePath, destinationPath, defaultOptio
252252*/
253253module . exports . copyFolder = function ( sourceFolderPath , destinationPath , defaultOptions , callback ) {
254254
255- if ( sourceFolderPath . length === 0 || typeof ( sourceFolderPath ) !== 'string'
256- || destinationPath . length === 0 || typeof ( destinationPath ) !== 'string' ) {
255+ if ( typeof ( destinationPath ) !== 'string' || typeof ( sourceFolderPath ) !== 'string'
256+ || destinationPath . length === 0 || sourceFolderPath . length === 0 ) {
257257 respond ( true , errorMessages . INVALID_DIRECTORY_PATH , callback ) ;
258258 return ;
259259 }
@@ -277,8 +277,8 @@ module.exports.copyFolder = function(sourceFolderPath, destinationPath, defaultO
277277*/
278278module . exports . moveFolder = function ( sourceFolderPath , destinationPath , defaultOptions , callback ) {
279279
280- if ( sourceFolderPath . length === 0 || typeof ( sourceFolderPath ) !== 'string'
281- || destinationPath . length === 0 || typeof ( destinationPath ) !== 'string' ) {
280+ if ( typeof ( destinationPath ) !== 'string' || typeof ( sourceFolderPath ) !== 'string'
281+ || destinationPath . length === 0 || sourceFolderPath . length === 0 ) {
282282 respond ( true , errorMessages . INVALID_DIRECTORY_PATH , callback ) ;
283283 return ;
284284 }
@@ -302,12 +302,12 @@ module.exports.moveFolder = function(sourceFolderPath, destinationPath, defaultO
302302*/
303303module . exports . createFolder = function ( folderName , parentFolderPath , defaultOptions , callback ) {
304304
305- if ( folderName . length === 0 || typeof ( folderName ) !== 'string' ) {
305+ if ( typeof ( folderName ) !== 'string' || folderName . length === 0 ) {
306306 respond ( true , errorMessages . INVALID_FOLDER_NAME , callback ) ;
307307 return ;
308308 }
309309
310- if ( parentFolderPath . length === 0 || typeof ( parentFolderPath ) !== 'string' ) {
310+ if ( typeof ( parentFolderPath ) !== 'string' || parentFolderPath . length === 0 ) {
311311 respond ( true , errorMessages . INVALID_DIRECTORY_PATH , callback ) ;
312312 return ;
313313 }
@@ -331,7 +331,7 @@ module.exports.createFolder = function(folderName, parentFolderPath, defaultOpti
331331*/
332332module . exports . deleteFolder = function ( folderPath , defaultOptions , callback ) {
333333
334- if ( folderPath . length === 0 || typeof ( folderPath ) !== 'string' ) {
334+ if ( typeof ( folderPath ) !== 'string' || folderPath . length === 0 ) {
335335 respond ( true , errorMessages . INVALID_DIRECTORY_PATH , callback ) ;
336336 return ;
337337 }
0 commit comments