Skip to content

File on SMB share longer than MAX_PATH raises an "file does not exists in the file system" error #5836

@KubaSzostak

Description

@KubaSzostak

Actual behavior and expected behavior

Opening raster file located on SMB share where the path has more than 260 characters raises file does not exists in the file system error. I expected to be able to open raster file located on SMB share where path is longer than 260 characters (MAX_PATH)

Steps to reproduce the problem.

  1. Create/copy TIF file on SMB share where the file path is longer than 260 characters (for example: \\localhost\gdal\max-path\50-characters-long-name-50-characters-long-name-50\50-characters-long-name-50-characters-long-name-50\50-characters-long-name-50-characters-long-name-50\50-characters-long-name-50-characters-long-name-50\264-character-length-file-path.tif)
  2. Call gdalinfo command against the file.
  3. [Instead of TIF file information error message will be shown]
  4. Copy the file into location where the path is less than 260 characters.
  5. Call gdalinfo command against the copied file.
  6. [TIF file information will be shown]

image

image

Operating system

Edition Windows 10 Pro
Version 21H2
OS build 19044.1706

GDAL version and provenance

gdalinfo --version
GDAL 3.5.0, released 2022/05/10

Remarks

Problem does not exists on regular file system (for example for files located on D:\ drive).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions