-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parseDirPath provides wrong path if defaultPath and defaultRoot are set in shinyDirChoose #110
Comments
@lbusett I see the issue. I'm not sure if there is a clean fix. My initial reaction is to simply get rid of Also, I'm having some issues even selecting a directory if @thomasp85, @Thercast, @AFriendlyRobot Thoughts? Original issue:
Alternative that seems less problematic:
|
@vnijs Thanks for looking into this. The "use case" here is that I am developing a shinyApp that creates and relies on a "standardized" folder structure. Since I have multiple files selectors for different types of datasets, I findit useful to automatically set the folder chooser on the basis of the kind of dataset, by changing defaultPath. However, I did not consider the possibility that the user could also change "root", making a mess with defaultroot. I recon that your suggestion of instead "adding" a new defaultRoot could be a better and safer solution (although it would not solve the issue we see when specifying both defaultPath and defaultRoot, leading to a "broken" path). |
Hi,
I am working with
shinyDirButton
andshinyDirChoose
to allow selection of a folder, starting from a specific default folder specified throghdefaultPath
anddefaultRoot
. The problem is that when I then invokeparseDirPath
to get the selected folder name, apparently thedefaultPath
value is ignored.In practice, the returned path is
while if I get the expected functionality right, it should be:
Below you can find an example (not really reprex because it is related to my "paths"):
If I run the example, I correctly get a "list of folders" starting from my "/home/lb/tmp" (although I see "main" on the top instead than "tmp" or "main/tmp"):
However, if I now select the "buttami" subfolder and click on "select", the path returned by
dirinfo <- parseDirPath(volumes, input$savedir)
is "/home/lb/buttami", while I would expect it to be "/home/lb/tmp/buttami"
Am I missing something/misunderstanding the functionality, here?
The text was updated successfully, but these errors were encountered: