Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  17 May 2024, Konstantin Olchanski, Bug Report, odbedit load into the wrong place 
    Reply  18 May 2024, Stefan Ritt, Bug Report, odbedit load into the wrong place 
Message ID: 2770     Entry time: 17 May 2024     Reply to this: 2774
Author: Konstantin Olchanski 
Topic: Bug Report 
Subject: odbedit load into the wrong place 
Trying to restore IRIS ODB was a nasty surprise, old save files are in .odb format and odbedit "load xxx.odb" 
does an unexpected thing.

mkdir tmp
cd tmp
load odb.xml loads odb.xml into the current directory "tmp"
load odb.json same thing
load odb.odb loads into "/" unexpectedly overwriting everything in my ODB with old data

this makes it impossible for me to restore just /equipment/beamline from old .odb save file (without 
overwriting all of my odb with old data).

I look inside db_paste() and it looks like this is intentional, if ODB path names in the odb save file start 
with "/" (and they do), instead of loading into the current directory it loads into "/", overwriting existing 
data.

The fix would be to ignore the leading "/", always restore into the current directory. This will make odbedit 
load consistent between all 3 odb save file formats.

Should I apply this change?

K.O.
ELOG V3.1.4-2e1708b5