Blame SOURCES/0022-v2v-i-ova-Don-t-fail-when-given-a-relative-path-to-a.patch

0d20ef
From 4de6d5e94dd9b38c86aca5554a16488f9d3dee00 Mon Sep 17 00:00:00 2001
0d20ef
From: "Richard W.M. Jones" <rjones@redhat.com>
0d20ef
Date: Tue, 21 Oct 2014 13:36:55 +0100
0d20ef
Subject: [PATCH] v2v: -i ova: Don't fail when given a relative path to an OVA
0d20ef
 directory (RHBZ#1155121).
0d20ef
0d20ef
(cherry picked from commit e1eccae2da3a670c1ef7626c8779b71fb1877f7d)
0d20ef
---
0d20ef
 v2v/input_ova.ml | 5 +++++
0d20ef
 1 file changed, 5 insertions(+)
0d20ef
0d20ef
diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml
0d20ef
index 6349c76..d9928de 100644
0d20ef
--- a/v2v/input_ova.ml
0d20ef
+++ b/v2v/input_ova.ml
0d20ef
@@ -66,6 +66,11 @@ object
0d20ef
           error (f_"%s: unsupported file format") ova
0d20ef
       ) in
0d20ef
 
0d20ef
+    (* Exploded path must be absolute (RHBZ#1155121). *)
0d20ef
+    let exploded =
0d20ef
+      if not (Filename.is_relative exploded) then exploded
0d20ef
+      else Sys.getcwd () // exploded in
0d20ef
+
0d20ef
     let files = Sys.readdir exploded in
0d20ef
     let ovf = ref "" in
0d20ef
     (* Search for the ovf file. *)
0d20ef
-- 
0d20ef
1.8.3.1
0d20ef