mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-05 20:34:07 +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)){
|
||||
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{
|
||||
Directory.CreateDirectory(dataFolder);
|
||||
File.Copy(defaultConfigPath, configPath, false);
|
||||
|
Loading…
Reference in New Issue
Block a user