Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6d33ff40
Commit
6d33ff40
authored
Jun 25, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
0586f010
546355f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
4 deletions
+32
-4
app/assets/javascripts/ide/stores/actions.js
app/assets/javascripts/ide/stores/actions.js
+0
-4
changelogs/unreleased/60860-keep-empty-folders-in-tree.yml
changelogs/unreleased/60860-keep-empty-folders-in-tree.yml
+5
-0
spec/javascripts/ide/stores/actions_spec.js
spec/javascripts/ide/stores/actions_spec.js
+27
-0
No files found.
app/assets/javascripts/ide/stores/actions.js
View file @
6d33ff40
...
...
@@ -208,10 +208,6 @@ export const deleteEntry = ({ commit, dispatch, state }, path) => {
commit
(
types
.
DELETE_ENTRY
,
path
);
if
(
entry
.
parentPath
&&
state
.
entries
[
entry
.
parentPath
].
tree
.
length
===
0
)
{
dispatch
(
'
deleteEntry
'
,
entry
.
parentPath
);
}
dispatch
(
'
triggerFilesChange
'
);
};
...
...
changelogs/unreleased/60860-keep-empty-folders-in-tree.yml
0 → 100644
View file @
6d33ff40
---
title
:
Keep the empty folders in the tree
merge_request
:
29196
author
:
type
:
fixed
spec/javascripts/ide/stores/actions_spec.js
View file @
6d33ff40
...
...
@@ -492,6 +492,33 @@ describe('Multi-file store actions', () => {
done
,
);
});
it
(
'
does not delete a folder after it is emptied
'
,
done
=>
{
const
testFolder
=
{
type
:
'
tree
'
,
tree
:
[],
};
const
testEntry
=
{
path
:
'
testFolder/entry-to-delete
'
,
parentPath
:
'
testFolder
'
,
opened
:
false
,
tree
:
[],
};
testFolder
.
tree
.
push
(
testEntry
);
store
.
state
.
entries
=
{
testFolder
,
'
testFolder/entry-to-delete
'
:
testEntry
,
};
testAction
(
deleteEntry
,
'
testFolder/entry-to-delete
'
,
store
.
state
,
[{
type
:
types
.
DELETE_ENTRY
,
payload
:
'
testFolder/entry-to-delete
'
}],
[{
type
:
'
burstUnusedSeal
'
},
{
type
:
'
triggerFilesChange
'
}],
done
,
);
});
});
describe
(
'
renameEntry
'
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment