Skip to content

In Windows, lsd won't list files whose full pathname exceeds 260 characters #1179

@BrBill

Description

@BrBill
  • os: Windows 11
  • lsd --version: lsd 1.2.0
  • echo $TERM: %TERM% and $TERM are not set
  • echo $LS_COLORS: not set

Expected behavior

lsd.exe, as with cmd.exe's DIR command, should list files even if their full pathnames exceed 260 characters. Here is an example with DIR on a very long folder path, where one file in a directory has a full pathname longer than 260 chars, and another pathname is shorter than 260 characters:

D:\TestDir1\VeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPath\MorePathMorePathMorePath\EvenMorePath1\EvenMorePath2\EvenMorePath3>dir
 Volume in drive D is DATA
 Volume Serial Number is C8FD-7AA3

 Directory of D:\TestDir1\VeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPath\MorePathMorePathMorePath\EvenMorePath1\EvenMorePath2\EvenMorePath3

2025-12-18  17:58    <DIR>          .
2025-12-18  17:56    <DIR>          ..
2025-12-18  17:57                 8 File.txt
2025-12-18  17:58                 8 ThisFileNameExceeds260Chars.txt
               2 File(s)             16 bytes
               2 Dir(s)  3,382,207,172,608 bytes free

Actual behavior

lsd.exe lists the files in the directory only if their full pathnames are shorter than 260 characters, so one file is skipped:

D:\TestDir1\VeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPathVeryLongPath\MorePathMorePathMorePath\EvenMorePath1\EvenMorePath2\EvenMorePath3>lsd -l
.a--- ? ? 8 B Thu Dec 18 17:57:23 2025 File.txt

Metadata

Metadata

Assignees

No one assigned

    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