Commit 84a1e37f authored by Clement Ho's avatar Clement Ho

Merge branch '57293-fix-image-rename' into 'master'

Resolve "Renaming an image via Web IDE corrupts it"

Closes #57293

See merge request gitlab-org/gitlab-ce!27486
parents fc77a89d 988fde17
......@@ -35,7 +35,7 @@ export default {
]),
...mapGetters('fileTemplates', ['showFileTemplatesBar']),
shouldHideEditor() {
return this.file && this.file.binary && !this.file.content;
return this.file && this.file.binary;
},
showContentViewer() {
return (
......
......@@ -213,7 +213,7 @@ export default {
? `${slashedParentPath}${oldEntry.name}`
: `${slashedParentPath}${name}`;
state.entries[newPath] = {
Vue.set(state.entries, newPath, {
...oldEntry,
id: newPath,
key: `${newPath}-${oldEntry.type}-${oldEntry.id}`,
......@@ -225,7 +225,7 @@ export default {
tree: [],
parentPath,
raw: '',
};
});
oldEntry.moved = true;
oldEntry.movedPath = newPath;
......
---
title: Resolve Renaming an image via Web IDE corrupts it
merge_request: 27486
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment