[BUG_FIXED] Fix a crash bug on Notepad++ start up.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1253 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
e959002a69
commit
2683ec18ea
@ -805,7 +805,7 @@ bool NppParameters::reloadLang()
|
||||
}
|
||||
|
||||
/*
|
||||
Spec for settings on cloud (dropbox, drive...)
|
||||
Spec for settings on cloud (dropbox, oneDrive and googleDrive)
|
||||
ON LOAD:
|
||||
1. if doLocalConf.xml, check nppInstalled/cloud/choice
|
||||
2. check the validity of 3 cloud and get the npp_cloud_folder according the choice.
|
||||
@ -850,7 +850,7 @@ generic_string NppParameters::getCloudSettingsPath(CloudChoice cloudChoice)
|
||||
generic_string dropboxInfoJson = tmp;
|
||||
|
||||
PathAppend(dropboxInfoJson, TEXT("Dropbox\\info.json"));
|
||||
|
||||
try {
|
||||
if (::PathFileExists(dropboxInfoJson.c_str()))
|
||||
{
|
||||
std::ifstream ifs(dropboxInfoJson.c_str(), std::ifstream::binary);
|
||||
@ -859,7 +859,6 @@ generic_string NppParameters::getCloudSettingsPath(CloudChoice cloudChoice)
|
||||
Json::Reader reader;
|
||||
|
||||
bool parsingSuccessful = reader.parse(ifs, root);
|
||||
|
||||
if (parsingSuccessful)
|
||||
{
|
||||
Json::Value personalRoot = root.get("personal", 0);
|
||||
@ -875,9 +874,12 @@ generic_string NppParameters::getCloudSettingsPath(CloudChoice cloudChoice)
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (...) {
|
||||
//printStr(TEXT("JsonCpp exception captured"));
|
||||
}
|
||||
|
||||
//
|
||||
// TODO: check if one drive is present
|
||||
// TODO: check if OneDrive is present
|
||||
//
|
||||
|
||||
// Get value from registry
|
||||
@ -914,7 +916,7 @@ generic_string NppParameters::getCloudSettingsPath(CloudChoice cloudChoice)
|
||||
cloudSettingsPath = settingsPath4dropbox;
|
||||
PathAppend(cloudSettingsPath, TEXT("Notepad++"));
|
||||
|
||||
// The folder %userprofile%\Dropbox\Notepad++ should exist.
|
||||
// The folder cloud_folder\Notepad++ should exist.
|
||||
// if it doesn't, it means this folder was removed by user, we create it anyway
|
||||
if (!PathFileExists(cloudSettingsPath.c_str()))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user