diff --git a/osrepodbmgr.Core/ChangeLog b/osrepodbmgr.Core/ChangeLog index 461f751..8d949a6 100644 --- a/osrepodbmgr.Core/ChangeLog +++ b/osrepodbmgr.Core/ChangeLog @@ -1,3 +1,8 @@ +2017-05-11 Natalia Portillo + + * Workers.cs: + Corrected file copy and extract. + 2017-05-11 Natalia Portillo * Workers.cs: diff --git a/osrepodbmgr.Core/Workers.cs b/osrepodbmgr.Core/Workers.cs index 33c1aba..9b7a897 100644 --- a/osrepodbmgr.Core/Workers.cs +++ b/osrepodbmgr.Core/Workers.cs @@ -1427,8 +1427,8 @@ namespace osrepodbmgr.Core jms.Position = 0; } - if(Finished != null) - Finished(); + if(FinishedWithText != null) + FinishedWithText(destination); } catch(Exception ex) { @@ -1500,7 +1500,7 @@ namespace osrepodbmgr.Core } FileStream inFs = new FileStream(Context.path, FileMode.Open, FileAccess.Read); - FileStream outFs = new FileStream(Context.path, FileMode.Create, FileAccess.Write); + FileStream outFs = new FileStream(Context.tmpFolder, FileMode.Create, FileAccess.Write); byte[] buffer = new byte[bufferSize]; diff --git a/osrepodbmgr/ChangeLog b/osrepodbmgr/ChangeLog index 0afb671..568b93d 100644 --- a/osrepodbmgr/ChangeLog +++ b/osrepodbmgr/ChangeLog @@ -1,3 +1,9 @@ +2017-05-11 Natalia Portillo + + * frmAdd.cs: + * frmMain.cs: + Corrected file copy and extract. + 2017-05-11 Natalia Portillo * frmAdd.cs: diff --git a/osrepodbmgr/frmAdd.cs b/osrepodbmgr/frmAdd.cs index 00bea40..e39a404 100644 --- a/osrepodbmgr/frmAdd.cs +++ b/osrepodbmgr/frmAdd.cs @@ -892,6 +892,7 @@ public partial class frmAdd : Dialog Workers.UpdateProgress -= UpdateProgress; Workers.UpdateProgress2 -= UpdateProgress2; prgProgress.Text = "Copying archive as is."; + thdPulseProgress.Start(); prgProgress2.Visible = false; lblProgress2.Visible = false; thdPackFiles = new Thread(Workers.CopyArchive); diff --git a/osrepodbmgr/frmMain.cs b/osrepodbmgr/frmMain.cs index 81d7bbd..f12adbd 100644 --- a/osrepodbmgr/frmMain.cs +++ b/osrepodbmgr/frmMain.cs @@ -256,7 +256,7 @@ namespace osrepodbmgr TreeIter osIter; if(treeOSes.Selection.GetSelected(out osIter)) { - Context.path = (string)osView.GetValue(osIter, 18); + Context.path = (string)osView.GetValue(osIter, 16); if(!File.Exists(Context.path)) { @@ -272,12 +272,12 @@ namespace osrepodbmgr if(dlgFolder.Run() == (int)ResponseType.Accept) { - dlgFolder.Destroy(); - Context.userExtracting = true; Context.tmpFolder = dlgFolder.Filename; Context.copyArchive = true; + dlgFolder.Destroy(); + lblProgress.Visible = true; lblProgress2.Visible = true; prgProgress.Visible = true; @@ -384,15 +384,15 @@ namespace osrepodbmgr Workers.UpdateProgress -= UpdateProgress; Workers.UpdateProgress2 -= UpdateProgress2; + MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Info, ButtonsType.Ok, + string.Format("Correctly extracted to {0}", Context.tmpFolder)); + dlgMsg.Run(); + dlgMsg.Destroy(); + Context.userExtracting = false; Context.tmpFolder = null; Context.copyArchive = false; Context.path = null; - - MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, - string.Format("Correctly extracted to {0}", Context.tmpFolder)); - dlgMsg.Run(); - dlgMsg.Destroy(); }); } @@ -401,7 +401,7 @@ namespace osrepodbmgr TreeIter osIter; if(treeOSes.Selection.GetSelected(out osIter)) { - Context.path = (string)osView.GetValue(osIter, 18); + Context.path = (string)osView.GetValue(osIter, 16); if(!File.Exists(Context.path)) { @@ -417,12 +417,12 @@ namespace osrepodbmgr if(dlgFolder.Run() == (int)ResponseType.Accept) { - dlgFolder.Destroy(); - Context.userExtracting = true; Context.tmpFolder = dlgFolder.Filename; Context.copyArchive = true; + dlgFolder.Destroy(); + lblProgress.Visible = true; prgProgress.Visible = true; treeOSes.Sensitive = false; @@ -520,15 +520,15 @@ namespace osrepodbmgr Workers.Finished -= CopyFileFinished; Workers.UpdateProgress -= UpdateProgress; + MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Info, ButtonsType.Ok, + string.Format("Correctly saved as {0}", Context.tmpFolder)); + dlgMsg.Run(); + dlgMsg.Destroy(); + Context.userExtracting = false; Context.tmpFolder = null; Context.copyArchive = false; Context.path = null; - - MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, - string.Format("Correctly saved as {0}", Context.tmpFolder)); - dlgMsg.Run(); - dlgMsg.Destroy(); }); }