gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] navidoc/navidoc/link __init__.py


From: Asko Soukka
Subject: [Gzz-commits] navidoc/navidoc/link __init__.py
Date: Tue, 20 May 2003 07:16:08 -0400

CVSROOT:        /cvsroot/navidoc
Module name:    navidoc
Changes by:     Asko Soukka <address@hidden>    03/05/20 07:16:08

Modified files:
        navidoc/link   : __init__.py 

Log message:
        suorat takaisin mutkiksi

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/navidoc/link/__init__.py.diff?tr1=1.14&tr2=1.15&r1=text&r2=text

Patches:
Index: navidoc/navidoc/link/__init__.py
diff -u navidoc/navidoc/link/__init__.py:1.14 
navidoc/navidoc/link/__init__.py:1.15
--- navidoc/navidoc/link/__init__.py:1.14       Tue May 20 06:40:47 2003
+++ navidoc/navidoc/link/__init__.py    Tue May 20 07:16:08 2003
@@ -19,7 +19,7 @@
 # MA  02111-1307  USA
 # 
 
-#$Id: __init__.py,v 1.14 2003/05/20 10:40:47 humppake Exp $
+#$Id: __init__.py,v 1.15 2003/05/20 11:16:08 humppake Exp $
 
 #
 # Written by Tuomas Lukka, Asko Soukka
@@ -52,7 +52,10 @@
         """
         dbg(self.key+' VAR: %s, S: %s, LIST: %s' % (var, s, list))
 
-        redirection_path = config.working_directory
+        if config.link_base_directory == None:
+            redirection_path = config.working_directory
+        else: redirection_path = config.link_base_directory
+            
         if (len(s.split(' ')) > 0):
             """
             The 'link' may be followed by an attributed, which is
@@ -60,8 +63,8 @@
             in config.
             """
             redirection = s.split(' ')[-1]
-            s = s[0:len(s)-len(redirection)-1]
             if config.link_redirection.has_key(redirection):
+                s = s[0:len(s)-len(redirection)-1]
                 redirection_path = config.link_redirection[redirection]
                 dbg('Redirection %s: %s' % (redirection, redirection_path))
 
@@ -77,10 +80,7 @@
                     link = link[0]
                 if self.target == None or \
                        not os.path.isfile(self.target):
-                    if config.link_base_directory == None:
-                        self.target = 
os.path.normpath(slashify(redirection_path) + link)
-                    else:
-                        self.target = 
os.path.normpath(slashify(redirection_path) + link)
+                    self.target = os.path.normpath(slashify(redirection_path) 
+ link)
 
             """
             Final check and setting attributes.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]