Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -2939,18 +2939,16 @@
// TODO: 409 means current folder does not exist, redirect ?
if (status === 404) {
// source not found, so remove it from the list
OC.Notification.show(t('files', 'Could not rename "{fileName}", it does not exist any more',
{fileName: oldName}), {timeout: 7, type: 'error'}
);
OC.Notification.show(t('files', 'Could not rename "{oldName}", it does not exist any more', { oldName }), {timeout: 7, type: 'error'});

self.remove(newName, {updateSummary: true});
return;
} else if (status === 412) {
// target exists
OC.Notification.show(
t('files', 'The name "{targetName}" is already used in the folder "{dir}". Please choose a different name.',
t('files', 'The name "{newName}" is already used in the folder "{dir}". Please choose a different name.',
{
targetName: newName,
newName,
dir: self.getCurrentDirectory(),
}),
{
Expand All @@ -2959,9 +2957,7 @@
);
} else {
// restore the item to its previous state
OC.Notification.show(t('files', 'Could not rename "{fileName}"',
{fileName: oldName}), {type: 'error'}
);
OC.Notification.show(t('files', 'Could not rename "{oldName}"', { oldName }), { type: 'error' });
}
updateInList(oldFileInfo);
});
Expand Down
Loading