@@ -3180,21 +3180,22 @@ static void CpSyncCheckPaths(const FunctionCallbackInfo<Value>& args) {
3180
3180
// Check if src and dest are identical.
3181
3181
if (std::filesystem::equivalent (src_path, dest_path)) {
3182
3182
std::string message = " src and dest cannot be the same %s" ;
3183
- return THROW_ERR_FS_CP_EINVAL (
3184
- env, message.c_str (), dest_path.string ());
3183
+ return THROW_ERR_FS_CP_EINVAL (env, message.c_str (), dest_path.string ());
3185
3184
}
3186
3185
3187
3186
const bool dest_is_dir =
3188
3187
dest_status.type () == std::filesystem::file_type::directory;
3189
3188
3190
3189
if (src_is_dir && !dest_is_dir) {
3191
- std::string message = " Cannot overwrite non-directory %s with directory %s" ;
3190
+ std::string message =
3191
+ " Cannot overwrite non-directory %s with directory %s" ;
3192
3192
return THROW_ERR_FS_CP_DIR_TO_NON_DIR (
3193
3193
env, message.c_str (), src_path.string (), dest_path.string ());
3194
3194
}
3195
3195
3196
3196
if (!src_is_dir && dest_is_dir) {
3197
- std::string message = " Cannot overwrite directory %s with non-directory %s" ;
3197
+ std::string message =
3198
+ " Cannot overwrite directory %s with non-directory %s" ;
3198
3199
return THROW_ERR_FS_CP_NON_DIR_TO_DIR (
3199
3200
env, message.c_str (), dest_path.string (), src_path.string ());
3200
3201
}
@@ -3234,27 +3235,23 @@ static void CpSyncCheckPaths(const FunctionCallbackInfo<Value>& args) {
3234
3235
}
3235
3236
3236
3237
if (src_is_dir && !recursive) {
3237
- std::string message = " Recursive option not enabled, cannot copy a directory: %s" ;
3238
- return THROW_ERR_FS_EISDIR (env,
3239
- message.c_str (),
3240
- src_path_str);
3238
+ std::string message =
3239
+ " Recursive option not enabled, cannot copy a directory: %s" ;
3240
+ return THROW_ERR_FS_EISDIR (env, message.c_str (), src_path_str);
3241
3241
}
3242
3242
3243
3243
switch (src_status.type ()) {
3244
3244
case std::filesystem::file_type::socket: {
3245
3245
std::string message = " Cannot copy a socket file: %s" ;
3246
- return THROW_ERR_FS_CP_SOCKET (
3247
- env, message.c_str (), dest_path_str);
3246
+ return THROW_ERR_FS_CP_SOCKET (env, message.c_str (), dest_path_str);
3248
3247
}
3249
3248
case std::filesystem::file_type::fifo: {
3250
3249
std::string message = " Cannot copy a FIFO pipe: %s" ;
3251
- return THROW_ERR_FS_CP_FIFO_PIPE (
3252
- env, message.c_str (), dest_path_str);
3250
+ return THROW_ERR_FS_CP_FIFO_PIPE (env, message.c_str (), dest_path_str);
3253
3251
}
3254
3252
case std::filesystem::file_type::unknown: {
3255
3253
std::string message = " Cannot copy an unknown file type: %s" ;
3256
- return THROW_ERR_FS_CP_UNKNOWN (
3257
- env, message.c_str (), dest_path_str);
3254
+ return THROW_ERR_FS_CP_UNKNOWN (env, message.c_str (), dest_path_str);
3258
3255
}
3259
3256
default :
3260
3257
break ;
0 commit comments