diff --git a/ChangeLog b/ChangeLog index 0cbaa6e..8a18f44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-11 Thomas Vander Stichele + + * morituri/image/image.py: + If paths are relative, make them relative to cue file. + 2009-04-11 Thomas Vander Stichele * morituri/common/task.py: diff --git a/morituri/image/image.py b/morituri/image/image.py index e0ea5df..2dd07a3 100644 --- a/morituri/image/image.py +++ b/morituri/image/image.py @@ -45,8 +45,12 @@ class Image: if os.path.exists(path): return path - # .cue FILE statements have Windows-style path separators + # .cue FILE statements have Windows-style path separators, so convert tpath = os.path.join(*path.split('\\')) + # if the path is relative, make it absolute relative to the cue file + if tpath != os.path.abspath(tpath): + tpath = os.path.join(os.path.dirname(self._path), tpath) + noext, _ = os.path.splitext(tpath) for ext in ['wav', 'flac']: cpath = '%s.%s' % (noext, ext)