validate:launcher: improve uri generation for --medias-path

When --medias-paths option is being used, right now we have to
specify the full path, like /home/user/gst/master/media/
But when inside master directory, would like to specify only
media/ and expect it to work. Using os.path.abspath and create uri based on that.
This way we can either just pass media/ or pass the full path as parameters.

https://bugzilla.gnome.org/show_bug.cgi?id=752518
This commit is contained in:
Vineeth TM 2015-08-04 08:35:16 +09:00 committed by Nicolas Dufresne
parent b37c550b2b
commit ac172a9ac6

View file

@ -672,7 +672,7 @@ not been tested and explicitely activated if you set use --wanted-tests ALL""")
else: else:
for root, dirs, files in os.walk(path): for root, dirs, files in os.walk(path):
for f in files: for f in files:
fpath = os.path.join(path, root, f) fpath = os.path.join(os.path.abspath(path), root, f)
if os.path.isdir(fpath) or \ if os.path.isdir(fpath) or \
fpath.endswith(GstValidateMediaDescriptor.MEDIA_INFO_EXT) or\ fpath.endswith(GstValidateMediaDescriptor.MEDIA_INFO_EXT) or\
fpath.endswith(ScenarioManager.FILE_EXTENSION): fpath.endswith(ScenarioManager.FILE_EXTENSION):