mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-01-31 22:31:31 +01:00
Create misc folder if it doesn't exist.
This commit is contained in:
parent
4b62853daa
commit
998583fd6b
@ -148,6 +148,13 @@ static UINTN GetDebugLogFile()
|
||||
|
||||
if ( debugLogFileName.isEmpty() )
|
||||
{
|
||||
EFI_FILE_PROTOCOL *miscDirHandle;
|
||||
|
||||
Status = CloverDir.Open(&CloverDir, &miscDirHandle, L"misc", EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_CREATE, EFI_FILE_DIRECTORY);
|
||||
if ( !EFI_ERROR(Status) ) {
|
||||
miscDirHandle->Close(miscDirHandle);
|
||||
}
|
||||
|
||||
debugLogFileName = S8Printf("misc\\%04d-%02d-%02d_%02d-%02d_%ls.log", Now.Year, Now.Month, Now.Day, Now.Hour, Now.Minute, self.getCloverEfiFileNameOrNull().wc_str());
|
||||
Status = CloverDir.Open(&CloverDir, &LogFile, debugLogFileName.wc_str(), EFI_FILE_MODE_READ, 0);
|
||||
if ( !EFI_ERROR(Status) ) LogFile->Close(LogFile); // DO NOT modify Status here.
|
||||
|
Loading…
Reference in New Issue
Block a user