Skip to content
Prev Previous commit
Remove unwanted semicolons
Signed-off-by: Kavita Sonawane <[email protected]>
  • Loading branch information
TSI-kavitasonawane committed Feb 28, 2022
commit 90f7c916893db44a5603562bac6ea08f4c42224f
11 changes: 5 additions & 6 deletions apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -3067,7 +3067,7 @@
this.filesClient.createDirectory(targetPath)
.done(function() {
options = _.extend({scrollTo: true}, options || {});
+ self.addAndFetchFileInfo(targetPath, '', options).then(function(status, data) {
self.addAndFetchFileInfo(targetPath, '', options).then(function(status, data) {
deferred.resolve(status, data);
}, function() {
OC.Notification.show(t('files', 'Could not create folder "{dir}"',
Expand Down Expand Up @@ -3538,11 +3538,10 @@
},

getUniqueName: function(name) {
var fileNamesOld = this.files.findIndex(function(el)
{
return el.name==name;
});
if (fileNamesOld!=-1) {
var fileNamesOld = this.files.findIndex(function(el) {
return el.name === name
})
if (fileNamesOld !== -1) {
var numMatch;
var parts=name.split('.');
var extension = "";
Expand Down
8 changes: 4 additions & 4 deletions apps/files/js/newfilemenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
iconClass: 'icon-folder',
fileType: 'folder',
actionHandler: function(name) {
const uniqueName = self.fileList.getUniqueName(name);
let tempPromise = self.fileList.createDirectory(uniqueName, { showDetailsView: false });
const uniqueName = self.fileList.getUniqueName(name)
let tempPromise = self.fileList.createDirectory(uniqueName, { showDetailsView: false })
Promise.all([tempPromise]).then(() => {
self.fileList.rename(uniqueName);
});
self.fileList.rename(uniqueName)
})
}
}];

Expand Down