Canop / broot

A new way to see and navigate directory trees : https://dystroy.org/broot
MIT License
10.64k stars 234 forks source link

When creating a new pane under Windows, the path contains garbage #812

Closed AeliusSaionji closed 3 months ago

AeliusSaionji commented 9 months ago

image

This happens with panel_right. This syntax looks like some code might be trying to referring to the device ID of the disk, but failing.

This bug was not present earlier this year. Subsequent operations in broot DO fail because the garbled path gets passed to powershell, rmdir, xcopy, etc.

Canop commented 9 months ago

I thought I fixed this with broot 1.30.2. Can you check you have the last version ?

Canop commented 9 months ago

BTW it's not really garbage but what's called UNC paths: https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths

AeliusSaionji commented 9 months ago

You're right, it is fixed! Sorry, I compile broot locally and I had 1.30.2 on my desktop but not my laptop

AeliusSaionji commented 3 months ago

A variant of this bug appears to have been reintroduced in version 1.39.1. Last known working version 1.38.0 1.39.0 untested

However all paths are UNC now, not just new panes.

Canop commented 3 months ago

Oh, thanks for noticing. I know where this comes from. I'll make a PR and request your test (I can't test on Windows).

Canop commented 3 months ago

@AeliusSaionji Can you check https://github.com/Canop/broot/pull/899 ?

AeliusSaionji commented 3 months ago

done 👍

AeliusSaionji commented 3 months ago

It occurs to me that my br.ps1 could be modified to handle UNC paths if this is desirable. Powershell can process them with a certain flag.

It would probably not be desirable though, given that any custom command users may write would have to be aware of this gotcha (need to use flag -LiteralPath) across several commands. And it may cause confusion as not many Windows users are used to seeing their drives represented as UNC (myself included :D)

image