Azure / azureml-sdk-for-r

Azure Machine Learning SDK for R
https://azure.github.io/azureml-sdk-for-r/
Other
104 stars 40 forks source link

Nested prefix path created when using download_from_datastore #396

Open nwstephens opened 3 years ago

nwstephens commented 3 years ago

I want to download a specific directory from my datastore into my target_path. When I set the datastore, target_path and prefix arguments in download_from_datastore, I expect the contents of that specific directory to land in the target path. Instead, the prefix path lands in my target path as nested subdirectories. I then have to manually move the files up the hierarchy and into my target path. I would not expect to have the files land in my target directory instead of having to move them out of the nested prefix path.

download_from_datastore(
datastore = "mydatastore",
target_path = "~",
prefix = "sub1/sub2",
overwrite = FALSE,
show_progress = TRUE
)
dir("~")
[1] "sub1"

In the example above, all the files in the prefix path sub1/sub2 land in ~/sub1/sub2/. I would expect the files to land in ~/, instead of under a nested prefix path.