Skip to content

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

@qarmin

Description

@qarmin
          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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions