Comments (14)
Specifically, eza
will have no problems if symbolic links are created using pwersehll's New-Item -ItemType symboliclink -Target "D:\Code\test1" -Path "D:\Code\test2"
.
from eza.
Hello, would you mind running EZA_DEBUG=1 eza -l
, and sendingthe output in codeblock as I cannot test in a windows environnement. But I might be able to discern why is this happening
from eza.
Hi, I created a test
, pointing to c
(using a relative adress form). Here is the output:
[INFO eza] matching on exa.run
[DEBUG eza] Running with options: Options {
dir_action: List,
filter: FileFilter {
list_dirs_first: false,
sort_field: Name(
AaBbCc,
),
flags: [],
dot_filter: JustFiles,
ignore_patterns: IgnorePatterns {
patterns: [],
},
git_ignore: Off,
},
view: View {
mode: Details(
Options {
table: Some(
Options {
size_format: DecimalBytes,
time_format: DefaultFormat,
user_format: Name,
group_format: Regular,
flags_format: Long,
columns: Columns {
time_types: TimeTypes {
modified: true,
changed: false,
accessed: false,
created: false,
},
inode: false,
links: false,
blocksize: false,
group: false,
git: false,
subdir_git_repos: false,
subdir_git_repos_no_stat: false,
octal: false,
security_context: false,
file_flags: false,
permissions: true,
filesize: true,
user: true,
},
},
),
header: false,
xattr: false,
secattr: false,
mounts: false,
color_scale: ColorScaleOptions {
mode: Gradient,
min_luminance: 40,
size: false,
age: false,
},
},
),
width: Automatic,
file_style: Options {
classify: JustFilenames,
show_icons: Never,
quote_style: QuoteSpaces,
embed_hyperlinks: Off,
absolute: Off,
is_a_tty: true,
},
deref_links: false,
total_size: false,
},
theme: Options {
use_colours: Automatic,
colour_scale: ColorScaleOptions {
mode: Gradient,
min_luminance: 40,
size: false,
age: false,
},
definitions: Definitions {
ls: None,
exa: None,
},
},
stdin: Args,
}
[DEBUG eza::fs::file] Statting file "."
[DEBUG eza::fs::file] deref_links false
[DEBUG eza::fs::file] Reading link "."
[ERROR eza::fs::file] Error following link "c": Os {
code: 2,
kind: NotFound,
message: "系统找不到指定的文件。",
}
[DEBUG eza::output::table] Creating table with columns: [Permissions, FileSize, Timestamp(Modified)]
[DEBUG eza::fs::file] Reading link "."
[ERROR eza::fs::file] Error following link "c": Os {
code: 2,
kind: NotFound,
message: "系统找不到指定的文件。",
}
[DEBUG eza::output::details] file_name TextCell { contents: TextCellContents([AnsiGenericString { style: Style { fg(Cyan) }, string: ".", oscontrol: None }, AnsiGenericString { style: Style {}, string: " ", oscontrol: None }, AnsiGenericString { style: Style { fg(Red) }, string: "->", oscontrol: None }, AnsiGenericString { style: Style {}, string: " ", oscontrol: None }, AnsiGenericString { style: Style { fg(Red), underline }, string: "c", oscontrol: None }]), width: DisplayWidth(6) }
l---- 0 20 Jun 14:06 . -> c
These reported errors indicate that eza
doesn't seem to support resolving relative addresses in symbolic links; I tried creating that link using an absolute address and found that eza worked fine. Of course, I'm not asking eza
to add symbolic links for resolving relative links (although I don't really know why it hasn't), as it seems that symbolic links for relative addresses seem to be something rather outdated:
Specifically,
eza
will have no problems if symbolic links are created using pwersehll'sNew-Item -ItemType symboliclink -Target "D:\Code\test1" -Path "D:\Code\test2"
.
As mentioned in that comment, PowerShell also allows the creation of symbolic links, but New-Item
already enforces the use of absolute addresse as Target
. Anyway, it seems that only cmd
's dir
now supports resolving symbolic links to relative addresses.
thx your reply
from eza.
Hey just added some debug infos to the program on the linked branch so that we get more infos, but it seems that the problem might come from path resolving or metadata resolving
from eza.
Hi, i clone the repo and checkout to branch 1025-bug
. The following is the output:
[INFO eza] matching on exa.run
[DEBUG eza] Running with options: Options {
dir_action: List,
filter: FileFilter {
list_dirs_first: false,
sort_field: Name(
AaBbCc,
),
flags: [],
dot_filter: JustFiles,
ignore_patterns: IgnorePatterns {
patterns: [],
},
git_ignore: Off,
},
view: View {
mode: Details(
Options {
table: Some(
Options {
size_format: DecimalBytes,
time_format: DefaultFormat,
user_format: Name,
group_format: Regular,
flags_format: Long,
columns: Columns {
time_types: TimeTypes {
modified: true,
changed: false,
accessed: false,
created: false,
},
inode: false,
links: false,
blocksize: false,
group: false,
git: false,
subdir_git_repos: false,
subdir_git_repos_no_stat: false,
octal: false,
security_context: false,
file_flags: false,
permissions: true,
filesize: true,
user: true,
},
},
),
header: false,
xattr: false,
secattr: false,
mounts: false,
color_scale: ColorScaleOptions {
mode: Gradient,
min_luminance: 40,
size: false,
age: false,
},
},
),
width: Automatic,
file_style: Options {
classify: JustFilenames,
show_icons: Never,
quote_style: QuoteSpaces,
embed_hyperlinks: Off,
absolute: Off,
is_a_tty: true,
},
deref_links: false,
total_size: false,
},
theme: Options {
use_colours: Automatic,
colour_scale: ColorScaleOptions {
mode: Gradient,
min_luminance: 40,
size: false,
age: false,
},
definitions: Definitions {
ls: None,
exa: None,
},
},
stdin: Args,
}
[DEBUG eza::fs::file] Statting file "."
[DEBUG eza::fs::file] deref_links false
[DEBUG eza::fs::file] Reading link "."
[DEBUG eza::fs::file] Error 系统找不到指定的文件。 (os error 2) following "c"
[ERROR eza::fs::file] Error following link "c": Os {
code: 2,
kind: NotFound,
message: "系统找不到指定的文件。",
}
[DEBUG eza::output::table] Creating table with columns: [Permissions, FileSize, Timestamp(Modified)]
[DEBUG eza::fs::file] Reading link "."
[DEBUG eza::fs::file] Error 系统找不到指定的文件。 (os error 2) following "c"
[ERROR eza::fs::file] Error following link "c": Os {
code: 2,
kind: NotFound,
message: "系统找不到指定的文件。",
}
[DEBUG eza::output::details] file_name TextCell { contents: TextCellContents([AnsiGenericString { style: Style { fg(Cyan) }, string: ".", oscontrol: None }, AnsiGenericString { style: Style {}, string: " ", oscontrol: None }, AnsiGenericString { style: Style { fg(Red) }, string: "->", oscontrol: None }, AnsiGenericString { style: Style {}, string: " ", oscontrol: None }, AnsiGenericString { style: Style { fg(Red), underline }, string: "c", oscontrol: None }]), width: DisplayWidth(6) }
l---- 0 20 Jun 15:43 . -> c
from eza.
Okay so as I expected this looks like a rust std lib error, where it cannot find the file.
from eza.
The debug output neglects to print the absolute_path
being given to std::fs::metadata
Line 421 in 7e21ed9
My guess would be there's something interesting about that path.
from eza.
Ah I think I understand the issue. This is caused by the difference between .
on Windows and POSIX. In POSIX it's a real file that exists (if only in the mind of the kernel). Whereas on Windows there is no .
. It's resolved by parsing the path.
So on Windows C:\path\to\dir\.
is really just a fancy way of writing C:\path\to\dir
(i.e. it's resolved just by modifying the path, the filesystem and kernel don't know anything about it). Whereas in POSIX /path/to/dir/.
is an actual file you can stat or whatever that links to /path/to/dir
. Mostly this difference doesn't matter but if C:\path\to\dir
is a symlink then this causes confusion because the code assumes it's a POSIX .
link. Instead it's reading the link from the parent dir.
So to try to put it more clearly reading test2\.
reads the link from test2
. This link is relative to test2
's parent, not from test2
itself. Hence it's not found when looking within test2
.
from eza.
That may be right, when I created a c
folder inside test
, I ran eza
inside test
and it showed the contents of the c
folder I created, not the c
folder that test
was originally pointing to. This means that when I run eza
in test
, my cwd
is still inside test
, but it is looking for a c
folder here.
from eza.
Ah I think I understand the issue. This is caused by the difference between . on Windows and POSIX. In POSIX it's a real file that exists (if only in the mind of the kernel). Whereas on Windows there is no .. It's resolved by parsing the path.
Is there a known way to resolve this that you might know of ?
from eza.
I'm not familiar enough with eza's code base to say with any confidence. I'm not clear why it's trying to stat .
. That's not normally shown, right? In any case it might be that .
and ..
need to be treated specially. I.e. decide that they are always considered links to their respective parent.
from eza.
Oh okay I see, we will need some special case handling i guess.
Thoughts @PThorpe92 @cafkafk @gierens ?
from eza.
Oh okay I see, we will need some special case handling i guess.
Thoughts @PThorpe92 @cafkafk @gierens ?
Honestly I'm not sure I fully understand the issue, but one way would maybe be to create separate code for unix/windows targets that deal with this. Likely something a windows user would have to do.
from eza.
yes thats indeed what we need to have in order for those links to be handled
from eza.
Related Issues (20)
- bug: 0.18.18 release is missing executables HOT 1
- bug?: missing release assets of v0.18.18? HOT 1
- bug: Cannot install from deb.gierens.de as the endpoint seems down HOT 1
- test: integration testing of #1028
- bug: Autocompletion Crash on eza v0.18.20 with Zsh HOT 2
- bug: tab completion does not work in zsh HOT 3
- feat: add eza to regular debian apt registry HOT 2
- feat: Add Icon for Jenkinsfile HOT 1
- bug: `EZA_GRID_ROWS` does not have any effect on grid details view HOT 3
- bug: eza hangs with option `--git` in home directory HOT 6
- bug: crash when a file was modified on or after the first of january 262143 HOT 1
- bug: v0.18.9 introduced listing bug in Windows version - Vim terminal HOT 2
- Request for a 'statically compiled binary' for macOS arm64 HOT 1
- bug: -F breaks tab completion in zsh HOT 6
- feat: Choice of icon HOT 1
- bug: The 'sb' option in EZA_COLORS seems not working HOT 3
- bug: man page doesn't have `PERMISSION DENIED` status HOT 1
- aarch64 binaries aren't shipped with git support HOT 7
- feat: expose eza's display capabilities to apply to just one file
- feat: add JSON output HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eza.