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"))
|
if (currentFileRelativePath.EndsWith(".bak"))
|
||||||
{
|
{
|
||||||
Log.Debug($"EXCLUDING BAK FILE :: {currentFileRelativePath}");
|
Log.Debug($"EXCLUDING BAK FILE :: {currentFileRelativePath}");
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
fileCopies.Add(new CopyInfo(file.FullName, file.FullName.Replace(sourceDir.FullName, targetDir.FullName)));
|
fileCopies.Add(new CopyInfo(file.FullName, file.FullName.Replace(sourceDir.FullName, targetDir.FullName)));
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
<PackageIcon>icon.ico</PackageIcon>
|
<PackageIcon>icon.ico</PackageIcon>
|
||||||
<ApplicationIcon>Assets\spt_installer.ico</ApplicationIcon>
|
<ApplicationIcon>Assets\spt_installer.ico</ApplicationIcon>
|
||||||
<Configurations>Debug;Release;TEST</Configurations>
|
<Configurations>Debug;Release;TEST</Configurations>
|
||||||
<AssemblyVersion>2.88</AssemblyVersion>
|
<AssemblyVersion>2.89</AssemblyVersion>
|
||||||
<FileVersion>2.88</FileVersion>
|
<FileVersion>2.89</FileVersion>
|
||||||
<Company>SPT</Company>
|
<Company>SPT</Company>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.Diagnostics;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
@ -93,7 +94,11 @@ public class MessageViewModel : ViewModelBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
var dataObject = new DataObject();
|
var dataObject = new DataObject();
|
||||||
|
|
||||||
|
var filesToCopy = new List<IStorageFile>();
|
||||||
|
|
||||||
var logFile = await desktop.MainWindow.StorageProvider.TryGetFileFromPathAsync(data.DebugMode ? App.LogDebugPath : App.LogPath);
|
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)
|
if (logFile == null)
|
||||||
{
|
{
|
||||||
@ -101,7 +106,14 @@ public class MessageViewModel : ViewModelBase
|
|||||||
return;
|
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);
|
await desktop.MainWindow.Clipboard.SetDataObjectAsync(dataObject);
|
||||||
ClipCommandText = "Copied!";
|
ClipCommandText = "Copied!";
|
||||||
@ -190,6 +202,11 @@ public class MessageViewModel : ViewModelBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
File.Copy(App.LogPath, Path.Join(data.TargetInstallPath, "spt-installer.log"), true);
|
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)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user