OpenLP says servicefile containing songs with linked is corrupt when opening on different computer

Bug #1398403 reported by Tomas Groth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Fix Released
Low
Unassigned

Bug Description

Confirmed using trunk (and beta 2.1.1).
I created a servicefile with a song with linked audio on a windows pc, moved it to a linux box and got a popup saying the file was corrupt. The second time I tried to open it it worked...

The underlying traceback is this:
  File "/home/tgc/openlp/code/bugfixes9/openlp/core/ui/servicemanager.py", line 771, in load_file
    self.process_service_items(items)
  File "/home/tgc/openlp/code/bugfixes9/openlp/core/common/openlpmixin.py", line 65, in wrapped
    raise e
  File "/home/tgc/openlp/code/bugfixes9/openlp/core/common/openlpmixin.py", line 61, in wrapped
    return func(*args, **kwargs)
  File "/home/tgc/openlp/code/bugfixes9/openlp/core/ui/servicemanager.py", line 830, in process_service_items
    new_item = Registry().get(service_item.name).service_load(service_item)
  File "/home/tgc/openlp/code/bugfixes9/openlp/plugins/songs/lib/mediaitem.py", line 549, in service_load
    self._update_background_audio(song, item)
  File "/home/tgc/openlp/code/bugfixes9/openlp/plugins/songs/lib/mediaitem.py", line 93, in _update_background_audio
    shutil.copyfile(os.path.join(AppLocation.get_section_data_path('servicemanager'), bga), dest_file)
  File "/usr/lib/python3.4/shutil.py", line 107, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] Ingen sådan fil eller filkatalog: '/home/tgc/.local/share/openlp/servicemanager/C:\\Users\\tgc\\AppData\\Roaming\\openlp\\data\\songs\\audio\\1\\Revival.mp3'

The problem lies in the way treat the path from the zip and/or the serviceitem.

Related branches

Phill (phill-ridout)
Changed in openlp:
importance: Undecided → Low
Tim Bentley (trb143)
Changed in openlp:
milestone: none → 2.1.2
status: New → Fix Committed
Tim Bentley (trb143)
Changed in openlp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.