1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Bug #1193: Fix onedb migrator 3.3.0_to_3.3.80.rb when IMAGE/SOURCE is empty

This commit is contained in:
Carlos Martín 2012-03-30 15:49:32 +02:00
parent becb3da61e
commit 3d347d024e

View File

@ -234,6 +234,11 @@ module Migrator
# Update SOURCE
doc.root.each_element("SOURCE") { |e|
previous_source = e.text
if previous_source.nil?
next
end
hash = previous_source.split('/')[-1]
if ( hash.length == 32 && hash =~ /^[0-9A-F]+$/i )