You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Otherwise the resulting zip file will be corrupted. :(
[18:42:52.770 FTL] Exception Occurred (at SoundSwitch.Program.HandleException)
System.IO.IOException: The process cannot access the file 'C:\Users\u\AppData\Roaming\SoundSwitch\Logs\soundswitch20200503.log' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.Compression.ZipFileExtensions.DoCreateEntryFromFile(ZipArchive destination, String sourceFileName, String entryName, Nullable`1 compressionLevel)
at System.IO.Compression.ZipFile.DoCreateFromDirectory(String sourceDirectoryName, String destinationArchiveFileName, Nullable`1 compressionLevel, Boolean includeBaseDirectory, Encoding entryNameEncoding)
at SoundSwitch.Program.HandleException(Exception exception) in C:\Users\Antoine\source\repos\SoundSwitch\SoundSwitch\Program.cs:line 245
at SoundSwitch.Program.Main() in C:\Users\Antoine\source\repos\SoundSwitch\SoundSwitch\Program.cs:line 172
Otherwise the resulting zip file will be corrupted. :(
(From #427 (comment))
Solution:
Log.CloseAndFlush()
beforeZipFile.CreateFromDirectory
.The text was updated successfully, but these errors were encountered: