mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
improved error message in webui: show full path of file if read failed
This commit is contained in:
parent
9897def2cc
commit
ff9bf71aa8
4 changed files with 42 additions and 7 deletions
|
@ -743,7 +743,7 @@ static bool checkAccount(std::string accountdir, AccountDetails &account,std::ma
|
|||
//#include <CFBundle.h>
|
||||
#endif
|
||||
|
||||
/*static*/ std::string RsAccountsDetail::PathDataDirectory()
|
||||
/*static*/ std::string RsAccountsDetail::PathDataDirectory(bool check)
|
||||
{
|
||||
std::string dataDirectory;
|
||||
|
||||
|
@ -809,6 +809,9 @@ static bool checkAccount(std::string accountdir, AccountDetails &account,std::ma
|
|||
#endif
|
||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
|
||||
if(!check)
|
||||
return dataDirectory;
|
||||
|
||||
/* Make sure the directory exists, else return emptyString */
|
||||
if (!RsDirUtil::checkDirectory(dataDirectory))
|
||||
{
|
||||
|
@ -1246,7 +1249,7 @@ bool RsInit::LoadPassword(const std::string& id, const std::string& inPwd)
|
|||
|
||||
// Directories.
|
||||
std::string RsAccounts::ConfigDirectory() { return rsAccounts->PathBaseDirectory(); }
|
||||
std::string RsAccounts::DataDirectory() { return RsAccountsDetail::PathDataDirectory(); }
|
||||
std::string RsAccounts::DataDirectory(bool check) { return RsAccountsDetail::PathDataDirectory(check); }
|
||||
std::string RsAccounts::PGPDirectory() { return rsAccounts->PathPGPDirectory(); }
|
||||
std::string RsAccounts::AccountDirectory() { return rsAccounts->PathAccountDirectory(); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue