gerardog/gsudo

Issue: `--copyev` throws System.IO.IOException: The filename, directory name, or volume label syntax is incorrect.

gerardog opened this issue · 1 comments

Issue Description

C:\Users\gerar>gsudo --copyev
Debug: Invoking Shell: Cmd
Debug: Command Line: --copyev

Error: System.IO.IOException: The filename, directory name, or volume label syntax is incorrect. : 'C:\Users\gerar\"C:\WINDOWS\TEMP\gsudo\47e1018a-89b5-4646-bb49-08875f17eeff.bat"'
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String, FileMode, FileAccess, FileShare, FileOptions) + 0x15c
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String, FileMode, FileAccess, FileShare, FileOptions, Int64, Nullable`1) + 0x44
   at System.IO.File.OpenHandle(String, FileMode, FileAccess, FileShare, FileOptions, Int64) + 0x7e
   at System.IO.File.WriteToFile(String, FileMode, String, Encoding) + 0x95
   at gsudo.Helpers.CommandToRunBuilder.AddCopyEnvironment(ElevationRequest.ConsoleMode) + 0x8ad
   at gsudo.Commands.RunCommand.<Execute>d__6.MoveNext() + 0x103
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
   at gsudo.Program.<Start>d__1.MoveNext() + 0x1d3

Context:

  • gsudo version:

gsudo v2.0.0 (Branch.tags-v2.0.0.Sha.87e0dbe9db2c52506db9974772139b0f119b827f)
Copyright(c) 2019-2022 Gerardo Grignoli and GitHub contributors

Fixed in v2.0.1