diff --git a/XenModel/Actions/VM/ImportVmAction.cs b/XenModel/Actions/VM/ImportVmAction.cs index c79584ef7..e35ae8858 100644 --- a/XenModel/Actions/VM/ImportVmAction.cs +++ b/XenModel/Actions/VM/ImportVmAction.cs @@ -96,29 +96,12 @@ namespace XenAdmin.Actions #endregion } - private string GetVmRef(string result) - { - if (string.IsNullOrEmpty(result)) - return null; - - string head = ""; - string tail = ""; - - if (!result.StartsWith(head) || !result.EndsWith(tail)) - return null; - - int start = head.Length; - int length = result.IndexOf(tail) - start; - - return result.Substring(start, length); - } - protected override void Run() { SafeToExit = false; bool isTemplate; - string vmRef = GetVmRef(applyFile()); + string vmRef = applyFile(); if (string.IsNullOrEmpty(vmRef)) return;