Parse the OS properly
git-svn-id: file:///home/svn/framework3/trunk@8492 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
bfa3ae28cb
commit
c47e4db74d
|
@ -913,8 +913,13 @@ class DBManager
|
|||
data = f.read(f.stat.size)
|
||||
import(data)
|
||||
end
|
||||
|
||||
def import(data)
|
||||
firstline = data[0, data.index("\n")]
|
||||
di = data.index("\n")
|
||||
if(not di)
|
||||
raise DBImportError.new("Could not automatically determine file type")
|
||||
end
|
||||
firstline = data[0, di]
|
||||
if (firstline.index("<NeXposeSimpleXML"))
|
||||
return import_nexpose_simplexml(data)
|
||||
elsif (firstline.index("<?xml"))
|
||||
|
|
Loading…
Reference in New Issue