Code: Select all
diff --git i/unicode_far/main.cpp w/unicode_far/main.cpp
index 58a5ac1..348345a 100644
--- i/unicode_far/main.cpp
+++ w/unicode_far/main.cpp
@@ -385,9 +385,12 @@ static void InitProfile(string &strProfilePath, string &strLocalProfilePath)
Global->Opt->LocalProfilePath = strLocalProfilePath.empty() ? strProfilePath : strLocalProfilePath;
}
- CreatePath(Global->Opt->ProfilePath + L"\\PluginsData", true);
- if (Global->Opt->ProfilePath != Global->Opt->LocalProfilePath)
- CreatePath(Global->Opt->LocalProfilePath, true);
+ if (!Global->Opt->ReadOnlyConfig)
+ {
+ CreatePath(Global->Opt->ProfilePath + L"\\PluginsData", true);
+ if (Global->Opt->ProfilePath != Global->Opt->LocalProfilePath)
+ CreatePath(Global->Opt->LocalProfilePath, true);
+ }
Global->Opt->LoadPlug.strPersonalPluginsPath = Global->Opt->ProfilePath + L"\\Plugins";
diff --git i/unicode_far/sqlitedb.cpp w/unicode_far/sqlitedb.cpp
index 79daa58..f0f3c4b 100644
--- i/unicode_far/sqlitedb.cpp
+++ w/unicode_far/sqlitedb.cpp
@@ -260,21 +260,27 @@ void SQLiteDb::Initialize(const string& DbName, bool Local)
AutoMutex m(path.data(), DbName.data());
strName = DbName;
init_status = 0;
- if (!InitializeImpl(DbName, Local))
+
+ bool in_memory = Global->Opt->ReadOnlyConfig != 0;
+
+ if (!in_memory && !InitializeImpl(DbName, Local))
{
Close();
++init_status;
- bool in_memory = (Global->Opt->ReadOnlyConfig != 0)
- || !api::MoveFileEx(strPath, strPath+L".bad",MOVEFILE_REPLACE_EXISTING) || !InitializeImpl(DbName,Local);
+ in_memory = !api::MoveFileEx(strPath, strPath+L".bad",MOVEFILE_REPLACE_EXISTING) || !InitializeImpl(DbName,Local);
if (in_memory)
{
Close();
++init_status;
- InitializeImpl(L":memory:", Local);
}
}
+
+ if (in_memory)
+ {
+ InitializeImpl(L":memory:", Local);
+ }
}
int SQLiteDb::InitStatus(string& name, bool full_name)