Skip to content

Actually return the root folder when traversing up the tree - #9321

Merged
MorrisJobke merged 1 commit into
masterfrom
bugfix/noid/return_root_folder_when_at_root
Apr 27, 2018
Merged

Actually return the root folder when traversing up the tree#9321
MorrisJobke merged 1 commit into
masterfrom
bugfix/noid/return_root_folder_when_at_root

Conversation

@rullzer

Copy link
Copy Markdown
Member

If you now keep calling $node->getParent() you will at some point get
the RootFolder back. This is a nice termination check and will prevent
endless loops if an exit condition is slightly off.

Signed-off-by: Roeland Jago Douma roeland@famdouma.nl

If you now keep calling $node->getParent() you will at some point get
the RootFolder back. This is a nice termination check and will prevent
endless loops if an exit condition is slightly off.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@codecov

codecovBot commented Apr 26, 2018

Copy link
Copy Markdown

Codecov Report

Merging #9321 into master will decrease coverage by <.01%.
The diff coverage is 75%.

@@ Coverage Diff @@## master #9321 +/- ##
============================================
- Coverage 51.93% 51.92% -0.01% - Complexity 25388 25391 +3 
============================================
Files 1608 1608 Lines 95440 95443 +3 Branches 1394 1394 ============================================
- Hits 49563 49561 -2 - Misses 45877 45882 +5
Impacted FilesCoverage ΔComplexity Δ
lib/private/Files/Node/Node.php80.85% <75%> (-0.31%)65 <0> (+3)
core/js/js.js65.41% <0%> (-0.56%)0% <0%> (ø)
apps/files_trashbin/lib/Trashbin.php72.7% <0%> (+0.24%)136% <0%> (ø)⬇️

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense 👍

@MorrisJobke
MorrisJobke merged commit 7306d30 into masterApr 27, 2018
@MorrisJobke
MorrisJobke deleted the bugfix/noid/return_root_folder_when_at_root branch April 27, 2018 11:59
@MorrisJobke

Copy link
Copy Markdown
Member

stable12: #12059
stable13: #12060

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugenhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@rullzer@MorrisJobke@icewind1991