Skip to content

Commit db2b025

Browse files
committed
CLOUDSTACK-5639: If path field in the TO already has the complete path, do
not try to generate the path.
1 parent 68fda5a commit db2b025

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,23 @@ public string FullFileName
168168
}
169169
else if (this.nfsDataStore != null)
170170
{
171-
fileName = this.nfsDataStore.UncPath;
172-
if (this.path != null)
171+
if (this.path != null && File.Exists(this.path))
173172
{
174-
fileName += @"\" + this.path;
173+
fileName = this.path;
175174
}
176-
177-
fileName = Utils.NormalizePath(fileName);
178-
if (Directory.Exists(fileName))
175+
else
179176
{
180-
fileName = Utils.NormalizePath(fileName + @"\" + this.name);
177+
fileName = this.nfsDataStore.UncPath;
178+
if (this.path != null)
179+
{
180+
fileName += @"\" + this.path;
181+
}
182+
183+
fileName = Utils.NormalizePath(fileName);
184+
if (Directory.Exists(fileName))
185+
{
186+
fileName = Utils.NormalizePath(fileName + @"\" + this.name);
187+
}
181188
}
182189
}
183190
else

0 commit comments

Comments
 (0)