You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by de...@apache.org on 2014/01/10 12:08:37 UTC

git commit: updated refs/heads/master to db2b025

Updated Branches:
  refs/heads/master 68fda5a8d -> db2b02560


CLOUDSTACK-5639: If path field in the TO already has the complete path, do
not try to generate the path.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/db2b0256
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/db2b0256
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/db2b0256

Branch: refs/heads/master
Commit: db2b0256080d70d5bc2efb91baad733d21c18bec
Parents: 68fda5a
Author: Devdeep Singh <de...@gmail.com>
Authored: Fri Jan 10 23:33:18 2014 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Fri Jan 10 16:37:43 2014 +0530

----------------------------------------------------------------------
 .../HypervResource/CloudStackTypes.cs           | 21 +++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/db2b0256/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
index a3258ce..89f0814 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
@@ -168,16 +168,23 @@ namespace HypervResource
                 }
                 else if (this.nfsDataStore != null)
                 {
-                    fileName = this.nfsDataStore.UncPath;
-                    if (this.path != null)
+                    if (this.path != null && File.Exists(this.path))
                     {
-                        fileName += @"\" + this.path;
+                        fileName = this.path;
                     }
-
-                    fileName = Utils.NormalizePath(fileName);
-                    if (Directory.Exists(fileName))
+                    else
                     {
-                        fileName = Utils.NormalizePath(fileName + @"\" + this.name);
+                        fileName = this.nfsDataStore.UncPath;
+                        if (this.path != null)
+                        {
+                            fileName += @"\" + this.path;
+                        }
+
+                        fileName = Utils.NormalizePath(fileName);
+                        if (Directory.Exists(fileName))
+                        {
+                            fileName = Utils.NormalizePath(fileName + @"\" + this.name);
+                        }
                     }
                 }
                 else