mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-31 08:34:10 +02:00
Remove old plugin config migration code
This commit is contained in:
parent
35bb196832
commit
3f4ea1af08
@ -73,22 +73,6 @@ private void OnMetadataLoaded(){
|
|||||||
if (configPath.Length > 0 && defaultConfigPath.Length > 0 && !File.Exists(configPath) && File.Exists(defaultConfigPath)){
|
if (configPath.Length > 0 && defaultConfigPath.Length > 0 && !File.Exists(configPath) && File.Exists(defaultConfigPath)){
|
||||||
string dataFolder = GetPluginFolder(PluginFolder.Data);
|
string dataFolder = GetPluginFolder(PluginFolder.Data);
|
||||||
|
|
||||||
if (!Directory.Exists(dataFolder)){ // config migration
|
|
||||||
string originalFile = Path.Combine(GetPluginFolder(PluginFolder.Root), ConfigFile);
|
|
||||||
|
|
||||||
if (File.Exists(originalFile)){
|
|
||||||
try{
|
|
||||||
Directory.CreateDirectory(dataFolder);
|
|
||||||
File.Copy(originalFile, configPath, false);
|
|
||||||
File.Delete(originalFile); // will fail without write perms in program folder, ignore if so
|
|
||||||
}catch{
|
|
||||||
// ignore
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
try{
|
try{
|
||||||
Directory.CreateDirectory(dataFolder);
|
Directory.CreateDirectory(dataFolder);
|
||||||
File.Copy(defaultConfigPath, configPath, false);
|
File.Copy(defaultConfigPath, configPath, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user