mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 04:12:37 +09:00
F #1249: Add .vmdk mandatory extension
This commit is contained in:
1 parent
fb46275ea2
commit
e28f8a1202
1 file changed
+4
-1
@@ -66,6 +66,10 @@ target_path = "#{ds_image_dir}/#{id}"
|
||||
if VCenterDriver::FileHelper.is_remote_or_needs_unpack?(img_path)
|
||||
temp_folder = File.join(VAR_LOCATION, "vcenter/#{target_path}")
|
||||
temp_file = File.join(temp_folder, File.basename(img_path))
|
||||
# if the original file doesn't have the .vmdk extension, add it
|
||||
if !temp_file.match(/\.vmdk$/)
|
||||
temp_file += ".vmdk"
|
||||
end
|
||||
|
||||
# Create tmp directory
|
||||
FileUtils.mkdir_p(temp_folder)
|
||||
@@ -153,4 +157,3 @@ files_to_upload.each_with_index do |f, index|
|
||||
end
|
||||
|
||||
FileUtils.rm_rf(temp_file) if temp_file
|
||||
|
||||
Reference in new issue
Block a user