Android: Allow opening/getting files relative to downloads directory

This commit is contained in:
Connor McLaughlin
2021-04-24 16:03:28 +10:00
parent 600ae7bcc0
commit 46d19eeb1f
16 changed files with 281 additions and 41 deletions

View File

@ -33,8 +33,7 @@ HostInterface::HostInterface()
g_host_interface = this;
// we can get the program directory at construction time
const std::string program_path = FileSystem::GetProgramPath();
m_program_directory = FileSystem::GetPathDirectory(program_path.c_str());
m_program_directory = FileSystem::GetPathDirectory(FileSystem::GetProgramPath());
}
HostInterface::~HostInterface()
@ -896,8 +895,7 @@ void HostInterface::CheckForSettingsChanges(const Settings& old_settings)
void HostInterface::SetUserDirectoryToProgramDirectory()
{
const std::string program_path(FileSystem::GetProgramPath());
const std::string program_directory(FileSystem::GetPathDirectory(program_path.c_str()));
const std::string program_directory(FileSystem::GetProgramPath());
m_user_directory = program_directory;
}