Artentus / ModMyFactory2

Rewrite of ModMyFactory, the Factorio mod manager
GNU General Public License v3.0
55 stars 18 forks source link

Attempt to import already existing mods from modpack is leading to crash #27

Open Melodeiro opened 3 years ago

Melodeiro commented 3 years ago

After executing a command: ModMyFactoryGUI.exe -i pack.fmpa

I have got a crash, because the mod is already existing in my system. Exception message on english: "Can't create file, because it exists already"

[12:37:37 ERR] Application crashed System.IO.IOException: Невозможно создать файл, так как он уже существует. at System.IO.FileSystem.MoveFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.FileInfo.MoveTo(String destFileName, Boolean overwrite) at System.IO.FileInfo.MoveTo(String destFileName) at ModMyFactory.IO.FileInfoExtensions.MoveToAsync(FileInfo file, String path) at ModMyFactory.Mods.ZippedModFile.MoveToAsync(String destination) at ModMyFactoryGUI.Helpers.ImportHelper.ImportModAsync(ImportResult result, ModDefinition modDef, AccurateVersion versionToDownload, IProgress1 progress) in C:\projects\modmyfactory-gui\ModMyFactoryGUI\Helpers\ImportHelper.cs:line 139 at ModMyFactoryGUI.Helpers.ImportHelper.ImportModsAsync(ImportResult result, IProgress1 progress) in C:\projects\modmyfactory-gui\ModMyFactoryGUI\Helpers\ImportHelper.cs:line 182 at ModMyFactoryGUI.Helpers.ImportHelper.ImportPackageAsync(FileInfo packageFile) in C:\projects\modmyfactory-gui\ModMyFactoryGUI\Helpers\ImportHelper.cs:line 230 at ModMyFactoryGUI.Helpers.ImportHelper.ImportPackagesAsync() in C:\projects\modmyfactory-gui\ModMyFactoryGUI\Helpers\ImportHelper.cs:line 264 at ModMyFactoryGUI.ViewModels.MainWindowViewModel.ImportPackagesAsync(IEnumerable1 paths) in C:\projects\modmyfactory-gui\ModMyFactoryGUI\ViewModels\MainWindowViewModel.cs:line 454 at ModMyFactoryGUI.ViewModels.MainWindowViewModel.EvaluateOptions(RunOptions options) in C:\projects\modmyfactory-gui\ModMyFactoryGUI\ViewModels\MainWindowViewModel.cs:line 461 at CommandLine.ParserResultExtensions.WithParsedAsync[T](ParserResult1 result, Func2 action) at ModMyFactoryGUI.ViewModels.MainWindowViewModel.WindowOpenedHandler(Object sender, EventArgs e) in C:\projects\modmyfactory-gui\ModMyFactoryGUI\ViewModels\MainWindowViewModel.cs:line 506 at System.Threading.Tasks.Task.<>c.b140_0(Object state) at Avalonia.Threading.AvaloniaSynchronizationContext.<>c__DisplayClass5_0.b0() at Avalonia.Threading.JobRunner.Job.Avalonia.Threading.JobRunner.IJob.Run() at Avalonia.Threading.JobRunner.RunJobs(Nullable1 priority) at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg) at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken) at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) at ModMyFactoryGUI.Program.StartAppAsync(String[] args, RunOptions options) in C:\projects\modmyfactory-gui\ModMyFactoryGUI\Program.cs:line 371