From 9ee9f463daa2be77341c21213a2d5b31d2b46ee2 Mon Sep 17 00:00:00 2001 From: "kenneth.skovhede@gmail.com" Date: Wed, 18 Feb 2009 19:08:05 +0000 Subject: [PATCH] Last minute changes to the beta release. git-svn-id: https://duplicati.googlecode.com/svn/trunk@94 59da171f-624f-0410-aa54-27559c288bec --- Duplicati/GUI/Wizard pages/Backends/File/FileOptions.cs | 2 +- Duplicati/GUI/Wizard pages/MainPage.cs | 2 +- Duplicati/Library/Core/Sizeparser.cs | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Duplicati/GUI/Wizard pages/Backends/File/FileOptions.cs b/Duplicati/GUI/Wizard pages/Backends/File/FileOptions.cs index eef7e42a2..7a824b304 100644 --- a/Duplicati/GUI/Wizard pages/Backends/File/FileOptions.cs +++ b/Duplicati/GUI/Wizard pages/Backends/File/FileOptions.cs @@ -112,7 +112,7 @@ namespace Duplicati.GUI.Wizard_pages.Backends.File return; } - m_wrapper.Path = TargetFolder.Text; + m_wrapper.Path = targetpath; if (UseCredentials.Checked) { m_wrapper.Username = Username.Text; diff --git a/Duplicati/GUI/Wizard pages/MainPage.cs b/Duplicati/GUI/Wizard pages/MainPage.cs index 8c1723bca..684270ec8 100644 --- a/Duplicati/GUI/Wizard pages/MainPage.cs +++ b/Duplicati/GUI/Wizard pages/MainPage.cs @@ -63,7 +63,7 @@ namespace Duplicati.GUI.Wizard_pages m_owner.ButtonPanel.Controls.Add(ShowAdvanced); ShowAdvanced.Top = m_owner.CancelButton.Top; ShowAdvanced.Left = m_owner.ButtonPanel.Width - m_owner.CancelButton.Right; - ShowAdvanced.Visible = true; + ShowAdvanced.Visible = false; //true; args.TreatAsLast = false; } diff --git a/Duplicati/Library/Core/Sizeparser.cs b/Duplicati/Library/Core/Sizeparser.cs index f4139bbe7..ed6153086 100644 --- a/Duplicati/Library/Core/Sizeparser.cs +++ b/Duplicati/Library/Core/Sizeparser.cs @@ -27,6 +27,11 @@ namespace Duplicati.Library.Core { public static long ParseSize(string size, string defaultSuffix) { + if (string.IsNullOrEmpty(size)) + return 0; + + size = size.ToLower().Trim(); + if (size.EndsWith("gb") || size.EndsWith("mb") || size.EndsWith("kb") || size.EndsWith("b")) return ParseSize(size); else @@ -35,8 +40,9 @@ namespace Duplicati.Library.Core public static long ParseSize(string size) { - if (size == null) + if (string.IsNullOrEmpty(size)) return 0; + string origsize = size; size = size.Trim().ToLower();