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

Errors in fs_extra are different than in std::fs #52

Open
qarmin opened this issue Nov 20, 2021 · 0 comments
Open

Errors in fs_extra are different than in std::fs #52

qarmin opened this issue Nov 20, 2021 · 0 comments

Comments

@qarmin
Copy link

qarmin commented Nov 20, 2021

          if let Err(e) = fs_extra::dir::move_dir(&thing, &destination_file, &fs_extra::dir::CopyOptions::new()) {
                messages += format!("Failed to move folder {}, reason {}\n", thing, e).as_str();
                continue 'next_result;
            }

such code prints(error contains file name)

Failed to move file /home/rafal/TESTTT/TT/AutoSave_0091.sav, reason Path "/home/rafal/TESTTT/TT/AutoSave_0091.sav" is exist

but such code from std::fs don't print name of file/folder which is I think better, because I can put this name in any other place

        if let Err(e) = fs::metadata("/hehe") {
            messages += format!("HEHE {}, reason {}\n", thing, e).as_str();
            continue 'next_result;
        }
HEHE /hehe reason No such file or directory (os error 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant