Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Where = / is passed as empty string.
Browse files Browse the repository at this point in the history
We try to determine the name of the restore object based on the name of
the VM disk we are restoring. When the where is set to something other
then '/' the restorepkt.ofname is relative to the given where path but
when no where is specified its not and we should not try to determine
the releative path but just use the restorepkt.ofname directly.
  • Loading branch information
Marco van Wieringen committed Dec 17, 2015
1 parent ed86ede commit 346d6b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vmware_plugin/BareosFdPluginVMware.py
Expand Up @@ -236,7 +236,11 @@ def create_file(self, context, restorepkt):
(restorepkt))

tmp_path = '/var/tmp/bareos-vmware-plugin'
objectname = '/' + os.path.relpath(restorepkt.ofname, restorepkt.where)
if restorepkt.where != "":
objectname = '/' + os.path.relpath(restorepkt.ofname, restorepkt.where)
else:
objectname = restorepkt.ofname

json_filename = tmp_path + objectname + '_cbt.json'
# for now, restore requires no snapshot to exist so disk to
# be written must be the the root-disk, even if a manual snapshot
Expand Down

0 comments on commit 346d6b8

Please sign in to comment.