File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
+MATLAB/+internal/private Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -27,16 +27,11 @@ static String 字符串转换(Array&& 输入)
2727}
2828static TypedArray<bool > 执行操作(SHFILEOPSTRUCTW& 操作结构)
2929{
30- switch (SHFileOperationW (&操作结构))
31- {
32- case ERROR_SUCCESS:
33- case ERROR_CANCELLED:
30+ int const 异常 = SHFileOperationW (&操作结构);
31+ if (异常 == ERROR_SUCCESS || 异常 == ERROR_CANCELLED)// 取消操作也算成功
3432 return 数组工厂.createScalar <bool >(操作结构.fAnyOperationsAborted );
35- case ERROR_FILE_NOT_FOUND:
36- EnumThrow (MATLAB::Exception::File_not_found);
37- default :
38- ThrowLastError (MATLAB::Exception::File_operation_failed);
39- }
33+ else
34+ EnumThrow (MATLAB::Exception::File_operation_failed, WindowsErrorMessage (异常));
4035}
4136static TypedArray<bool > CopyMove (matlab::mex::ArgumentList& 输入, UINT wFunc)
4237{
You can’t perform that action at this time.
0 commit comments