//\r
// open source file\r
//\r
- Status = ShellOpenFileByName(Source, &SourceHandle, EFI_FILE_MODE_READ, 0);\r
- ASSERT_EFI_ERROR(Status);\r
+ Status = ShellOpenFileByName (Source, &SourceHandle, EFI_FILE_MODE_READ, 0);\r
+ if (EFI_ERROR (Status)) {\r
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_CP_SRC_OPEN_FAIL), gShellLevel2HiiHandle, CmdName, Source);\r
+ return (SHELL_ACCESS_DENIED);\r
+ }\r
\r
//\r
//get file size of source file and freespace available on destination volume\r