diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index 4e7ff032a..a7051b9d9 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -36,6 +36,7 @@ import html import logging import os import uuid +import ntpath from PyQt4 import QtGui @@ -423,8 +424,12 @@ class ServiceItem(RegistryProperties): if 'background_audio' in header: self.background_audio = [] for filename in header['background_audio']: - # Give them real file paths - self.background_audio.append(os.path.join(path, filename)) + # Give them real file paths. + filepath = filename + if path: + # Windows can handle both forward and backward slashes, so we use ntpath to get the basename + filepath = os.path.join(path, ntpath.basename(filename)) + self.background_audio.append(filepath) self.theme_overwritten = header.get('theme_overwritten', False) if self.service_item_type == ServiceItemType.Text: for slide in service_item['serviceitem']['data']: