fs: fix wrong order of file names in cpSync error message · nodejs/node@8eb0d9d

Original file line numberDiff line numberDiff line change

@@ -3276,7 +3276,7 @@ static void CpSyncCheckPaths(const FunctionCallbackInfo<Value>& args) {

32763276

std::string message =

32773277

"Cannot overwrite non-directory %s with directory %s";

32783278

return THROW_ERR_FS_CP_DIR_TO_NON_DIR(

3279-

env, message.c_str(), src_path_str, dest_path_str);

3279+

env, message.c_str(), dest_path_str, src_path_str);

32803280

}

32813281
32823282

if (!src_is_dir && dest_is_dir) {