fs.copy
only works if the source directory contains subdirectories.
#154
Labels
bug
Something isn't working
The
fs.copy
function fails when trying to copy a directory that doesn't contain any subdirectories.Presumably this is because the function implementation at 'src/lune/builtin/fs/copy.rs' doesn't create the target directory and instead relies on fs::create_dir_all to create it while it populates the subdirectories.
This results in the function either silently failing (in the case of an empty directory), or throwing an error when trying to populate the files into the nonexistant target directory.
This is easily fixed by inserting
fs::create_dir_all(target).await?;
on line 152.The text was updated successfully, but these errors were encountered: