mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
[master] CA-375556: Pass non-compressed file stream to HTTP.CopyStream
(#3115)
* CA-375556: Pass non-compressed file stream to `HTTP.CopyStream` Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com> * CA-375556: Use `sourcefile` instead of `filePath` Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com> --------- Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
This commit is contained in:
parent
8ede70ff99
commit
65da63755f
@ -318,7 +318,7 @@ namespace XenAdmin.Actions.OvfActions
|
|||||||
{
|
{
|
||||||
vhdDisk = VirtualDisk.OpenDisk(sourcefile, FileAccess.Read);
|
vhdDisk = VirtualDisk.OpenDisk(sourcefile, FileAccess.Read);
|
||||||
virtualSize = vhdDisk.Capacity;
|
virtualSize = vhdDisk.Capacity;
|
||||||
dataStream = File.OpenRead(filePath);
|
dataStream = File.OpenRead(sourcefile);
|
||||||
dataLength = dataStream.Length;
|
dataLength = dataStream.Length;
|
||||||
format = "&format=vhd";
|
format = "&format=vhd";
|
||||||
}
|
}
|
||||||
@ -330,7 +330,7 @@ namespace XenAdmin.Actions.OvfActions
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
dataStream = File.OpenRead(filePath);
|
dataStream = File.OpenRead(sourcefile);
|
||||||
dataLength = virtualSize = dataStream.Length;
|
dataLength = virtualSize = dataStream.Length;
|
||||||
}
|
}
|
||||||
else if (VirtualDisk.SupportedDiskFormats.Any(f => ext.ToLower().EndsWith(f.ToLower())))
|
else if (VirtualDisk.SupportedDiskFormats.Any(f => ext.ToLower().EndsWith(f.ToLower())))
|
||||||
|
Loading…
Reference in New Issue
Block a user