mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-28 20:55:41 -04:00
HostInterface: Fix SetUserDirectoryToProgramDirectory()
This commit is contained in:
parent
3b7c6c7bbd
commit
d230e7d22f
@ -923,8 +923,15 @@ void HostInterface::CheckForSettingsChanges(const Settings& old_settings)
|
|||||||
|
|
||||||
void HostInterface::SetUserDirectoryToProgramDirectory()
|
void HostInterface::SetUserDirectoryToProgramDirectory()
|
||||||
{
|
{
|
||||||
const std::string program_directory(FileSystem::GetProgramPath());
|
std::string program_path(FileSystem::GetProgramPath());
|
||||||
m_user_directory = program_directory;
|
if (program_path.empty())
|
||||||
|
Panic("Failed to get program path.");
|
||||||
|
|
||||||
|
std::string program_directory(FileSystem::GetPathDirectory(program_path));
|
||||||
|
if (program_directory.empty())
|
||||||
|
Panic("Program path is not valid");
|
||||||
|
|
||||||
|
m_user_directory = std::move(program_directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HostInterface::OnHostDisplayResized()
|
void HostInterface::OnHostDisplayResized()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user