mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
More debug info for process start
This commit is contained in:
parent
38a8c5d506
commit
fed40dd465
1 changed files with 9 additions and 12 deletions
|
@ -119,25 +119,22 @@ public static void CopyAll(DirectoryInfo source, DirectoryInfo target)
|
|||
|
||||
public static void Zip(string source, string target)
|
||||
{
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo()
|
||||
{
|
||||
FileName = Path.GetFullPath(Program.SevenZipPath),
|
||||
Arguments = $"a -tzip \"{target}\" \"{source}\" -r -mx=9",
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true
|
||||
};
|
||||
|
||||
Process.Start(startInfo).WaitForExit();
|
||||
ProcessStart(Path.GetFullPath(Program.SevenZipPath), $"a -tzip \"{target}\" \"{source}\" -r -mx=9");
|
||||
}
|
||||
|
||||
public static void Unzip(string source, string extract)
|
||||
{
|
||||
Console.WriteLine("Extracting: " + source);
|
||||
ProcessStart(Path.GetFullPath(Program.SevenZipPath), $"e \"{source}\" \"{extract}\" -r");
|
||||
}
|
||||
|
||||
private static void ProcessStart(string filePath, string arguments)
|
||||
{
|
||||
Console.WriteLine($"Process starting: {filePath} {arguments}");
|
||||
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo()
|
||||
{
|
||||
FileName = Path.GetFullPath(Program.SevenZipPath),
|
||||
Arguments = $"e \"{source}\" \"{extract}\" -r",
|
||||
FileName = filePath,
|
||||
Arguments = arguments,
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue