diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 09:09:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 09:09:10 +0000 |
commit | b98fa9ef3d5bead417ae2f325cb64637883264e9 (patch) | |
tree | 409f2002dd056f12d82d3959b3e6f012c4087123 /app/assets/javascripts/ide | |
parent | 7e3005967df23a957fe1998c8de4f50b412e69e7 (diff) | |
download | gitlab-ce-b98fa9ef3d5bead417ae2f325cb64637883264e9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ide')
-rw-r--r-- | app/assets/javascripts/ide/lib/files.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/ide/stores/utils.js | 5 |
2 files changed, 3 insertions, 7 deletions
diff --git a/app/assets/javascripts/ide/lib/files.js b/app/assets/javascripts/ide/lib/files.js index bee867fa47c..26518a2abac 100644 --- a/app/assets/javascripts/ide/lib/files.js +++ b/app/assets/javascripts/ide/lib/files.js @@ -1,5 +1,4 @@ import { viewerInformationForPath } from '~/vue_shared/components/content_viewer/lib/viewer_utils'; -import { escapeFileUrl } from '~/lib/utils/url_utility'; import { decorateData, sortTree } from '../stores/utils'; export const splitParent = path => { @@ -48,7 +47,7 @@ export const decorateFiles = ({ id: path, name, path, - url: `/${projectId}/tree/${branchId}/-/${escapeFileUrl(path)}/`, + url: `/${projectId}/tree/${branchId}/-/${path}/`, type: 'tree', parentTreeUrl: parentFolder ? parentFolder.url : `/${projectId}/tree/${branchId}/`, tempFile, @@ -85,7 +84,7 @@ export const decorateFiles = ({ id: path, name, path, - url: `/${projectId}/blob/${branchId}/-/${escapeFileUrl(path)}`, + url: `/${projectId}/blob/${branchId}/-/${path}`, type: 'blob', parentTreeUrl: fileFolder ? fileFolder.url : `/${projectId}/blob/${branchId}`, tempFile, diff --git a/app/assets/javascripts/ide/stores/utils.js b/app/assets/javascripts/ide/stores/utils.js index 06e66da1069..4e5b01596d8 100644 --- a/app/assets/javascripts/ide/stores/utils.js +++ b/app/assets/javascripts/ide/stores/utils.js @@ -1,5 +1,4 @@ import { commitActionTypes, FILE_VIEW_MODE_EDITOR } from '../constants'; -import { escapeFileUrl } from '~/lib/utils/url_utility'; export const dataStructure = () => ({ id: '', @@ -220,9 +219,7 @@ export const mergeTrees = (fromTree, toTree) => { export const replaceFileUrl = (url, oldPath, newPath) => { // Add `/-/` so that we don't accidentally replace project path - const result = url.replace(`/-/${escapeFileUrl(oldPath)}`, `/-/${escapeFileUrl(newPath)}`); - - return result; + return url.replace(`/-/${oldPath}`, `/-/${newPath}`); }; export const swapInStateArray = (state, arr, key, entryPath) => |