windows: Remove SparkleShare folder migration code
This commit is contained in:
parent
2ca2c12475
commit
e0949ae082
|
@ -37,7 +37,8 @@ namespace SparkleLib {
|
|||
get {
|
||||
if (GetConfigOption ("home_path") != null)
|
||||
return GetConfigOption ("home_path");
|
||||
else if (SparkleHelpers.IsWindows)
|
||||
|
||||
if (SparkleHelpers.IsWindows)
|
||||
return Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
|
||||
else
|
||||
return Environment.GetFolderPath (Environment.SpecialFolder.Personal);
|
||||
|
@ -54,28 +55,6 @@ namespace SparkleLib {
|
|||
|
||||
public SparkleConfig (string config_path, string config_file_name)
|
||||
{
|
||||
try {
|
||||
Environment.SpecialFolder folder =
|
||||
(Environment.SpecialFolder) Enum.Parse(
|
||||
typeof(Environment.SpecialFolder), "UserProfile");
|
||||
|
||||
string old_path = Path.Combine (
|
||||
Environment.GetFolderPath (Environment.SpecialFolder.Personal), "SparkleShare");
|
||||
|
||||
if (Directory.Exists (old_path) &&
|
||||
Environment.OSVersion.Platform == PlatformID.Win32NT) {
|
||||
|
||||
string new_path = Path.Combine (Environment.GetFolderPath (folder), "SparkleShare");
|
||||
Directory.Move (old_path, new_path);
|
||||
|
||||
Console.WriteLine ("Migrated SparkleShare folder to %USERPROFILE%");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Console.WriteLine ("Failed to migrate: " + e.Message);
|
||||
// TODO: Remove this block when most people have migrated to the new path
|
||||
}
|
||||
|
||||
FullPath = Path.Combine (config_path, config_file_name);
|
||||
LogFilePath = Path.Combine (config_path, "debug-log.txt");
|
||||
|
||||
|
|
Loading…
Reference in a new issue