diff options
author | Diogo Laginha <dmachado@ipn.pt> | 2012-01-03 18:36:55 +0000 |
---|---|---|
committer | Diogo Laginha <dmachado@ipn.pt> | 2012-01-03 18:36:55 +0000 |
commit | 1c9f03ee271c5bf463eeea8d73efb58df75c4c6b (patch) | |
tree | 43e8e5c9e0277fc64618083caba09b1dfaf9f706 | |
parent | cea65c4623f779db4b9caefa3d29511aaa53e72f (diff) | |
download | pycco-1c9f03ee271c5bf463eeea8d73efb58df75c4c6b.tar.gz |
use absolute path for start path
-rw-r--r-- | pycco/main.py | 3 | ||||
-rw-r--r-- | pycco/utils.py | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/pycco/main.py b/pycco/main.py index 0031eea..ccdf9e3 100644 --- a/pycco/main.py +++ b/pycco/main.py @@ -497,7 +497,8 @@ def main(): if start.endswith( '*' ): return - start = os.path.dirname( os.path.dirname( start ) ) + start = os.path.dirname( os.path.dirname( os.path.abspath(start) ) ) + #start = os.path.dirname( os.path.dirname( start ) ) if opts.all: sources = [ i for i in get_all_files( filepath or '.', filetype ) ] diff --git a/pycco/utils.py b/pycco/utils.py index 2f0aed8..d110109 100644 --- a/pycco/utils.py +++ b/pycco/utils.py @@ -32,6 +32,7 @@ class Source: self.title = path.basename( self.name ) self.dirpath = path.dirname( self.name ) or '.' self.dirname = path.relpath(self.dirpath, start) + self.start = start def save_path(self): return "docs/%s/%s" %( self.dirname, self.title ) |