Commit ac8decf
fix(debug): show symlink metadata instead of target metadata
Fixes bounty issue #1577
The `cortex debug file` command was using `std::fs::metadata()` which
follows symlinks and returns metadata about the target file. This caused
symlinks to be displayed as their target type instead of showing they
are symlinks.
Changed to use `std::fs::symlink_metadata()` to get information about
the symlink itself. Also added a `symlink_target` field that shows
where the symlink points to when inspecting symlinks.1 parent 10d003a commit ac8decf
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
| |||
317 | 319 | | |
318 | 320 | | |
319 | 321 | | |
320 | | - | |
| 322 | + | |
| 323 | + | |
321 | 324 | | |
322 | 325 | | |
323 | 326 | | |
| |||
328 | 331 | | |
329 | 332 | | |
330 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
331 | 343 | | |
332 | 344 | | |
333 | 345 | | |
334 | 346 | | |
335 | 347 | | |
336 | 348 | | |
| 349 | + | |
337 | 350 | | |
338 | 351 | | |
339 | 352 | | |
| |||
398 | 411 | | |
399 | 412 | | |
400 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
401 | 417 | | |
402 | 418 | | |
403 | 419 | | |
| |||
0 commit comments