From c93afb0b498718b554403637077496f75adf9be5 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 20 Aug 2010 14:50:39 -0700 Subject: Make sure we get the right path to the file --- src/pyfedpkg/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: -- cgit