Commit Graph

13 Commits

Author SHA1 Message Date
David Peter
2d398dc4a7 Fix directory-existence check on Windows
This fixes a bug on Windows where `fd` could not be used on ram disks
and encrypted folders.

closes #752
2021-08-08 15:02:01 +02:00
David Peter
2a2126c40a Fix clippy warnings 2021-07-27 09:05:23 +02:00
Allen Wild
1a3615df9c set default path separator to '/' in MSYS
MSYS and MSYS2 environments (such as Git Bash) have a UNIX like
filesystem which uses '/' as the path separator rather than '\', but
Rust doesn't know about this by default.

On Windows, check the MSYSTEM environment variable and set the default
value of the --path-separator option to '/' for convenience.

There is no similar detection of Cygwin because there seems to be no way
for Rust (and any native Win32) programs to detect that they're being
called from a Cygwin environment. Cygwin users can use a shell
alias/function/script to wrap fd.

Fixes: https://github.com/sharkdp/fd/issues/537
2021-02-15 20:08:59 +01:00
sharkdp
0335cc362b Do not allow list-details in combination with -1 2020-04-16 10:11:05 +02:00
sharkdp
cb56add1d8 Add new --type socket and --type pipe filters
closes #511
2020-04-16 09:59:45 +02:00
sharkdp
6c9e743d43 Print path as raw bytes, allowing invalid UTF-8 filenames to be passed to other processes 2020-04-04 18:46:08 +02:00
sharkdp
ed45d1c5af Remove duplicate 'strip prefix' function 2020-04-04 18:46:08 +02:00
sharkdp
e44f2f8540 Rewrite replace_path_separator function 2020-04-03 23:01:57 +02:00
sharkdp
2ea77e7cdc Add TODOs, move function 2020-04-03 22:51:41 +02:00
sharkdp
33eb857a81 Cleanup 2020-04-03 22:36:32 +02:00
sharkdp
6e96154d86 Add tests for strip_current_dir 2020-04-03 22:36:32 +02:00
sharkdp
556c40e1f4 Move strip_current_dir 2020-04-03 22:36:32 +02:00
sharkdp
b415d7234b Rename fshelper to filesystem 2020-04-03 22:36:32 +02:00