mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Update FileDataProvider.cs
fix creation of file LocalConnectionProperties.xml if it does not exist
This commit is contained in:
@@ -21,6 +21,11 @@ namespace mRemoteNG.Config.DataProviders
|
||||
var fileContents = "";
|
||||
try
|
||||
{
|
||||
if (!File.Exists(FilePath))
|
||||
{
|
||||
CreateMissingDirectories();
|
||||
File.WriteAllLines(FilePath, new []{ $@"<?xml version=""1.0"" encoding=""UTF-8""?>", $@"<LocalConnections/>" });
|
||||
}
|
||||
fileContents = File.ReadAllText(FilePath);
|
||||
}
|
||||
catch (FileNotFoundException ex)
|
||||
|
||||
Reference in New Issue
Block a user