Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fd does not want to work when cwd is non existent #1072

Closed
Zykino opened this issue Jul 31, 2022 · 3 comments · Fixed by #1079
Closed

fd does not want to work when cwd is non existent #1072

Zykino opened this issue Jul 31, 2022 · 3 comments · Fixed by #1079
Labels

Comments

@Zykino
Copy link

Zykino commented Jul 31, 2022

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.

@vijfhoek
Copy link
Contributor

vijfhoek commented Jul 31, 2022

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?

@tmccombs
Copy link
Collaborator

@vijfhoek that commit looks good to me.

@sharkdp
Copy link
Owner

sharkdp commented Aug 3, 2022

sharkdp, how do you feel about this issue - do you agree this is a bug?

Yes, thank you for creating a fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants