use continue instead of break
debug log is now copied to install folder; copy button now copies patcher log as well
This commit is contained in:
parent
944e34fa6b
commit
a0a6e6dd81
@ -61,7 +61,7 @@ public static class FileHelper
|
||||
if (currentFileRelativePath.EndsWith(".bak"))
|
||||
{
|
||||
Log.Debug($"EXCLUDING BAK FILE :: {currentFileRelativePath}");
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
fileCopies.Add(new CopyInfo(file.FullName, file.FullName.Replace(sourceDir.FullName, targetDir.FullName)));
|
||||
|
@ -10,8 +10,8 @@
|
||||
<PackageIcon>icon.ico</PackageIcon>
|
||||
<ApplicationIcon>Assets\spt_installer.ico</ApplicationIcon>
|
||||
<Configurations>Debug;Release;TEST</Configurations>
|
||||
<AssemblyVersion>2.88</AssemblyVersion>
|
||||
<FileVersion>2.88</FileVersion>
|
||||
<AssemblyVersion>2.89</AssemblyVersion>
|
||||
<FileVersion>2.89</FileVersion>
|
||||
<Company>SPT</Company>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Avalonia;
|
||||
using ReactiveUI;
|
||||
using Serilog;
|
||||
@ -93,7 +94,11 @@ public class MessageViewModel : ViewModelBase
|
||||
}
|
||||
|
||||
var dataObject = new DataObject();
|
||||
|
||||
var filesToCopy = new List<IStorageFile>();
|
||||
|
||||
var logFile = await desktop.MainWindow.StorageProvider.TryGetFileFromPathAsync(data.DebugMode ? App.LogDebugPath : App.LogPath);
|
||||
var patcherLogFile = await desktop.MainWindow.StorageProvider.TryGetFileFromPathAsync(Path.Join(data.TargetInstallPath, "patcher.log"));
|
||||
|
||||
if (logFile == null)
|
||||
{
|
||||
@ -101,7 +106,14 @@ public class MessageViewModel : ViewModelBase
|
||||
return;
|
||||
}
|
||||
|
||||
dataObject.Set(DataFormats.Files, new[] {logFile});
|
||||
filesToCopy.Add(logFile);
|
||||
|
||||
if (patcherLogFile != null)
|
||||
{
|
||||
filesToCopy.Add(patcherLogFile);
|
||||
}
|
||||
|
||||
dataObject.Set(DataFormats.Files, filesToCopy.ToArray());
|
||||
|
||||
await desktop.MainWindow.Clipboard.SetDataObjectAsync(dataObject);
|
||||
ClipCommandText = "Copied!";
|
||||
@ -190,6 +202,11 @@ public class MessageViewModel : ViewModelBase
|
||||
}
|
||||
|
||||
File.Copy(App.LogPath, Path.Join(data.TargetInstallPath, "spt-installer.log"), true);
|
||||
|
||||
if (data.DebugMode)
|
||||
{
|
||||
File.Copy(App.LogDebugPath, Path.Join(data.TargetInstallPath, "spt-installer-debug.log"), true);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user