thomasp85 / shinyFiles

A shiny extension for server side file access
196 stars 47 forks source link

Check parent existence when attempting to navigate 'down' in directory selection #118

Closed AFriendlyRobot closed 5 years ago

AFriendlyRobot commented 5 years ago

This is a simple fix that should prevent infinite loops in the navigation behavior described in Issue #117 by checking that the parent directory exists before attempting to use it to find navigation targets.

When the last item in a directory (at any level) is selected and the user navigates 'down', shinyFiles attempts to 'bubble up' until a sibling can be found and used as a navigation target. Previously, this was allowed to create an infinite loop when navigating 'down' from the last item in the root. Essentially, shinyFiles was trying to navigate up the directory hierarchy infinitely.

codecov-io commented 5 years ago

Codecov Report

Merging #118 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #118   +/-   ##
=====================================
  Coverage       0%     0%           
=====================================
  Files           4      4           
  Lines         443    443           
=====================================
  Misses        443    443

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cf0bb70...0c58e67. Read the comment docs.