Fixed issues reported by SonarQube.

This commit is contained in:
Nikhil Mohite
2021-01-18 13:02:19 +05:30
committed by Akshay Joshi
parent 5afa4f1995
commit d4a3e4d92c
9 changed files with 56 additions and 51 deletions

View File

@@ -949,18 +949,18 @@ define([
};
renameItem(file_data);
let path = $('.currentpath').val();
let current_path = $('.currentpath').val();
if(isFolder == true) {
// if its folder rename, remove the temporary added class
$(this).closest('.tbl_folder').removeClass('tbl_folder_rename');
if(path.includes('\\')) {
path = $('.currentpath').val().split('\\').slice(0, -2).join('\\')+'\\';
if(current_path.includes('\\')) {
current_path = $('.currentpath').val().split('\\').slice(0, -2).join('\\')+'\\';
}
else {
path = $('.currentpath').val().split('/').slice(0, -2).join('/')+'/';
current_path = $('.currentpath').val().split('/').slice(0, -2).join('/')+'/';
}
}
getFolderInfo(path);
getFolderInfo(current_path);
}
}
} else {
@@ -1005,18 +1005,18 @@ define([
};
renameItem(file_data);
let path = $('.currentpath').val();
let current_path = $('.currentpath').val();
if(isFolder == true) {
// if its folder rename, remove the temporary added class
$(this).closest('.tbl_folder').removeClass('tbl_folder_rename');
if(path.includes('\\')) {
path = $('.currentpath').val().split('\\').slice(0, -2).join('\\')+'\\';
if(current_path.includes('\\')) {
current_path = $('.currentpath').val().split('\\').slice(0, -2).join('\\')+'\\';
}
else {
path = $('.currentpath').val().split('/').slice(0, -2).join('/')+'/';
current_path = $('.currentpath').val().split('/').slice(0, -2).join('/')+'/';
}
}
getFolderInfo(path);
getFolderInfo(current_path);
}
}
} else {