fix creazione directory + file conf

This commit is contained in:
Samuele E. Locatelli
2020-10-09 22:50:40 +02:00
parent 52bc32f98f
commit 0e07451e31
+3 -2
View File
@@ -1129,9 +1129,10 @@ namespace IOB_WIN
string confJson = JsonConvert.SerializeObject(IOBConf, Formatting.Indented);
string path = fileMover.GetExecutingDirectoryName(); // Directory.GetCurrentDirectory();
string fileName = Path.GetFileName(iniConfFile).Replace(".ini", ".iob");
string fullPath = $"{path}\\CONF\\{IOBConf.serverData.ClientInstall}\\{fileName}";
string dirPath = $"{path}\\DATA\\{IOBConf.serverData.ClientInstall}";
string fullPath = $"{dirPath}\\{fileName}";
// verifica directory
Directory.CreateDirectory(fullPath);
Directory.CreateDirectory(dirPath);
// salvataggio
File.WriteAllText(fullPath, confJson);