CLOUDSTACK-5639: If path field in the TO already has the complete path, do

not try to generate the path.
This commit is contained in:
Devdeep Singh 2014-01-10 23:33:18 +05:30
parent 68fda5a8dd
commit db2b025608

View File

@ -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