diff options
author | Jesse Keating <jkeating@redhat.com> | 2010-08-20 14:50:39 -0700 |
---|---|---|
committer | Jesse Keating <jkeating@redhat.com> | 2010-08-20 14:50:39 -0700 |
commit | c93afb0b498718b554403637077496f75adf9be5 (patch) | |
tree | e074798d2af0a448846591dcc70ed59c468f8d16 /src | |
parent | 9a3ba09498a59651eb7c6acd716b12526b6ae382 (diff) | |
download | fedora-packager-c93afb0b498718b554403637077496f75adf9be5.tar.gz fedora-packager-c93afb0b498718b554403637077496f75adf9be5.tar.xz fedora-packager-c93afb0b498718b554403637077496f75adf9be5.zip |
Make sure we get the right path to the file
Diffstat (limited to 'src')
-rw-r--r-- | src/pyfedpkg/__init__.py | 6 |
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: |