summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-08-20 14:50:39 -0700
committerJesse Keating <jkeating@redhat.com>2010-08-20 14:50:39 -0700
commitc93afb0b498718b554403637077496f75adf9be5 (patch)
treee074798d2af0a448846591dcc70ed59c468f8d16
parent9a3ba09498a59651eb7c6acd716b12526b6ae382 (diff)
downloadfedora-packager-c93afb0b498718b554403637077496f75adf9be5.zip
fedora-packager-c93afb0b498718b554403637077496f75adf9be5.tar.gz
fedora-packager-c93afb0b498718b554403637077496f75adf9be5.tar.xz
Make sure we get the right path to the file
-rw-r--r--src/pyfedpkg/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 2dfb0c4..e04db6b 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -459,7 +459,11 @@ def commit(path=None, message=None, file=None, files=[]):
if message:
cmd.extend(['-m', message])
elif file:
- cmd.extend(['-F', os.path.abspath(file)])
+ # If we get a relative file name, prepend our path to it.
+ if path and not file.startswith('/'):
+ cmd.extend(['-F', os.path.abspath(os.path.join(path, file))])
+ else:
+ cmd.extend(['-F', os.path.abspath(file)])
if not files:
cmd.append('-a')
else: