-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Docs clarification: /vsicurl?list_dir=no should actually be /vsicurl?empty_dir=yes #7163
Comments
It does has an effect, but mostly seen when using low level I/O primitives, and not that much with gdalinfo that will try to probe side-car files even if the initial directory listing is disable. Perhaps this could be rephrased as ?
Compare without list_dir=no, which attemps to do a GET to the directory of the file
with list_dir=no where the file is directly accessed (actually the URL signing stuff)
Seeing this, if pc_url_signing=yes is set, we should actually likely automatically disable directory listing as it can't work |
Thanks for the clarification @rouault!
Makes sense to me, for what it's worth the Planetary Computer JupyterHub automatically sets That said, is there a reason not to reuse the list_dir key and add the additional value option for empty_dir |
well, the GDAL_DISABLE_READDIR_ON_OPEN=YES/NO/EMPTY_DIR naming is quite hard to comprehend (double negations, non-boolean value EMPTY_DIR put in something where a boolean is expected from the DISABLE), so the list_dir=yes/no & empty_dir=yes/no split was an (apparently bad) attempt at making things easier to comprehend.
welcome |
Expected behavior and actual behavior.
https://gdal.org/user/virtual_file_systems.html#vsicurl-http-https-ftp-files-random-access
Describes the option to not list directories
gdal/doc/source/user/virtual_file_systems.rst
Line 239 in dfc7191
But looking at log output
list_dir=no
doesn't do anything and insteadempty_dir=yes
has the intended affect:Steps to reproduce the problem.
CPL_DEBUG=ON gdalinfo '/vsicurl?pc_url_signing=yes&list_dir=no&url=https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/045/031/LC08_L2SP_045031_20210107_20210307_02_T1/LC08_L2SP_045031_20210107_20210307_02_T1_ST_B10.TIF'
Operating system
OSX
GDAL version and provenance
The text was updated successfully, but these errors were encountered: