linux: Use ~/.config even when sandboxed
This commit is contained in:
parent
66f447c457
commit
741d31a5ef
|
@ -195,9 +195,12 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public BaseController ()
|
public BaseController ()
|
||||||
{
|
{
|
||||||
|
|
||||||
string app_data_path = Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData);
|
string app_data_path = Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData);
|
||||||
string config_path = Path.Combine (app_data_path, "sparkleshare");
|
|
||||||
|
if (InstallationInfo.Platform == PlatformID.Unix)
|
||||||
|
app_data_path = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), ".config");
|
||||||
|
|
||||||
|
string config_path = Path.Combine (app_data_path, "org.sparkleshare.SparkleShare");
|
||||||
|
|
||||||
Config = new Configuration (config_path, "config.xml");
|
Config = new Configuration (config_path, "config.xml");
|
||||||
Configuration.DefaultConfig = Config;
|
Configuration.DefaultConfig = Config;
|
||||||
|
@ -390,8 +393,8 @@ namespace SparkleShare {
|
||||||
void AddRepository (string folder_path)
|
void AddRepository (string folder_path)
|
||||||
{
|
{
|
||||||
BaseRepository repo = null;
|
BaseRepository repo = null;
|
||||||
string folder_name = Path.GetFileName (folder_path);
|
string folder_name = Path.GetFileName (folder_path);
|
||||||
string backend = Config.BackendByName (folder_name);
|
string backend = Config.BackendByName (folder_name);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
repo = (BaseRepository) Activator.CreateInstance (
|
repo = (BaseRepository) Activator.CreateInstance (
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
</ReleaseVersion>
|
</ReleaseVersion>
|
||||||
<SuppressXamMacMigration>True</SuppressXamMacMigration>
|
<SuppressXamMacMigration>True</SuppressXamMacMigration>
|
||||||
<SuppressXamMacUpsell>True</SuppressXamMacUpsell>
|
<SuppressXamMacUpsell>True</SuppressXamMacUpsell>
|
||||||
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>none</DebugType>
|
<DebugType>none</DebugType>
|
||||||
|
|
Loading…
Reference in a new issue