fd
fd copied to clipboard
fd does not want to work when cwd is non existent
What version of fd
are you using?
fd 8.3.1
fish, version 3.3.1
$ cd /mnt/path/to/some/external/drive
# Unmount the drive
# Remount the drive at the same space (may not be necessary)
fdfind someFolder /home/zykino/some/path/
[fd error]: Could not retrieve current directory (has it been deleted?).
I think this is a bug: when providing a path the cwd should not be accessed.
I happened to run into this issue too and fixed it since I agree fd shouldn't care about the current working directory when a search path is provided. For the record, an easier way to reproduce:
$ mkdir testdir
$ cd testdir
$ rmdir $PWD
$ fd foo /tmp
[fd error]: Could not retrieve current directory (has it been deleted?).
sharkdp, how do you feel about this issue - do you agree this is a bug?
@vijfhoek that commit looks good to me.
sharkdp, how do you feel about this issue - do you agree this is a bug?
Yes, thank you for creating a fix!