/[navidoc]/navidoc/navidoc/utils/path.py
ViewVC logotype

Diff of /navidoc/navidoc/utils/path.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by humppake, Mon Mar 24 08:08:13 2003 UTC revision 1.6 by humppake, Wed Mar 26 15:36:17 2003 UTC
# Line 56  def relative_path(source, target): Line 56  def relative_path(source, target):
56      Returns a relative path from the source to the target.      Returns a relative path from the source to the target.
57      """      """
58      if source == None or len(source) == 0: return target      if source == None or len(source) == 0: return target
59      if source.startswith('../') or target.startswith('../'):  
60          source = os.path.normpath(os.path.abspath(source))      ## Condition removed because because of docutils sending
61          target = os.path.normpath(os.path.abspath(target))      # relative and absolute paths mixed.
62        #
63        # if source.startswith('../') or target.startswith('../'):
64        source = os.path.normpath(os.path.abspath(source))
65        target = os.path.normpath(os.path.abspath(target))
66    
67      depth = source.count('/')      depth = source.count('/')
68      source_parts = source.split('/')      source_parts = source.split('/')

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26