Merge pull request #831 from Areloch/MiscFixes20220724

Misc FIxes 2022/07/24
This commit is contained in:
Areloch 2022-07-30 01:02:44 -05:00 committed by GitHub
commit 0a1fd3c278
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View file

@ -579,6 +579,9 @@ bool MountSystem::copyFile(const Path& source, const Path& destination, bool noO
}
FileRef sourceFile = openFile(source, FS::File::AccessMode::Read);
if (!sourceFile)
return false;
const U64 sourceFileSize = sourceFile->getSize();
void* writeBuffer = dMalloc(sourceFileSize);

View file

@ -1386,6 +1386,9 @@ bool GuiPopUpMenuCtrlEx::onKeyDown(const GuiEvent &event)
//------------------------------------------------------------------------------
void GuiPopUpMenuCtrlEx::onAction()
{
if (!mActive)
return;
GuiControl *canCtrl = getParent();
addChildren();

View file

@ -89,7 +89,10 @@ static String _BuildFileName(const String& prefix,const Path& path)
// internal path name.
String file = prefix;
file = Path::Join(file, '/', path.getPath());
file = Path::Join(file, '/', path.getFileName());
if (path.getFileName().isEmpty() && path.getExtension().isNotEmpty()) //weird, filename-less file, so handle it slightly special-case
file += String("/");
else
file = Path::Join(file, '/', path.getFileName());
file = Path::Join(file, '.', path.getExtension());
return file;
}