lsd icon indicating copy to clipboard operation
lsd copied to clipboard

File name too long (os error 63) when `ls --tree`

Open exploitJ opened this issue 3 years ago • 5 comments

  • os: macOS 12.3.1 Monterey
  • lsd --version: lsd 0.21.0
  • echo $TERM: xterm-kitty
  • echo $LS_COLORS: -

Expected behavior

if ls --tree is run on deep and long files, error occurs, and I guess it tries to resolve symlinks and resulting in a loop.

lsd: ./Library/Trial/Treatments/1000/factorPacks/624b701616a70b047e45b261/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/_refs/revlinks/link-17948945-2344-40F5-AB83-6A100A0AA867/assets/com.apple.siri.dialog.socialconversationfl#d5b431b/dialog/SocialConversation.catfamily/dalTalkLikeShakespeare.cat/_params.cat.bin: File name too long (os error 63).

Actual behavior

shows the tree

exploitJ avatar Apr 16 '22 03:04 exploitJ

I don't think this is because we follow symlink. lsd does not follow symlinks to directory unless explicit asked to using -L flag. This might just be a really long file name. link-17948945-2344-40F5-AB83-6A100A0AA867 seem to be repeating, but that might be from having that actually being the folder structure as it finally resolves to _params.cat.bin at the end.

That said, I am able to view the tree, but I am on linux and not macOS(guessing which you are on as I saw Library in there, please fill in the OS in the main comment if you are not). 2022-04-16-09-46-17

I have some question though:

  • Does tree command work in that directory?
  • Does lsd completely fail after this file, or does it continue with other items after showing this error?

meain avatar Apr 16 '22 04:04 meain

@meain Sorry for the late response.

I have some question though:

Does tree command work in that directory? Does lsd completely fail after this file, or does it continue with other items after showing this error?

  • after cd in to that long directory, I was able to print lsd --tree
  • it does continue with other items after showing this error(endless errors 😭)

exploitJ avatar Apr 28 '22 10:04 exploitJ

Does tree command work in that directory?

My question was weather the unix tree command (not the lsd version) works in the directory.

meain avatar Apr 28 '22 11:04 meain

Yes, unix tree works.

exploitJ avatar Apr 28 '22 12:04 exploitJ

I got a new MacBook Air and I installed lsd via brew. I have the same issue as well and normal tree works fine but using lsd --tree I get the error. My iMac uses an older version of lsd version 0.17.0 and it worked great when I used brew upgrade lsd and it upgraded to 0.21.0 I was getting the File name too long(os error 63) error Both systems are using macOS Monterey 12.4 I hope this helps

SiirRandall avatar May 21 '22 14:05 SiirRandall