File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3512,10 +3512,12 @@ static void CpSyncCopyDir(const FunctionCallbackInfo<Value>& args) {
35123512 std::filesystem::path dest) {
35133513 std::error_code error;
35143514 for (auto dir_entry : std::filesystem::directory_iterator (src)) {
3515+ auto dir_entry_path_str = PathToString (dir_entry.path ());
35153516 auto dest_file_path = dest / dir_entry.path ().filename ();
3517+ auto dest_file_path_str = PathToString (dest_file_path);
35163518
35173519 if (filter_fn &&
3518- !(*filter_fn)(dir_entry. path (). c_str (), dest_file_path .c_str ())) {
3520+ !(*filter_fn)(dir_entry_path_str. c_str (), dest_file_path_str .c_str ())) {
35193521 continue ;
35203522 }
35213523
@@ -3582,7 +3584,6 @@ static void CpSyncCopyDir(const FunctionCallbackInfo<Value>& args) {
35823584 }
35833585 } else if (std::filesystem::is_regular_file (dest_file_path)) {
35843586 if (!dereference || (!force && error_on_exist)) {
3585- auto dest_file_path_str = PathToString (dest_file_path);
35863587 env->ThrowStdErrException (
35873588 std::make_error_code (std::errc::file_exists),
35883589 " cp" ,
You can’t perform that action at this time.
0 commit comments