[PATCH] Do not add unnecessary / at end of location on divelogs import

Miika Turkia miika.turkia at gmail.com
Thu May 16 20:48:38 PDT 2013


The check if both location and site exist was flawed causing an extra
slash on location name when the SITE was empty. Thus resulting in
multiple location candidates when exporting to divelogs.de and
re-importing to Subsurface.

Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
 xslt/divelogs.xslt |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xslt/divelogs.xslt b/xslt/divelogs.xslt
index 32a59c3..2f191ae 100644
--- a/xslt/divelogs.xslt
+++ b/xslt/divelogs.xslt
@@ -46,7 +46,7 @@
       <location>
         <xsl:for-each select="LOCATION|SITE">
           <xsl:value-of select="."/>
-          <xsl:if test=". != '' and following-sibling::*[1] != ''"> / </xsl:if>
+          <xsl:if test=". != '' and following-sibling::SITE[1] != ''"> / </xsl:if>
         </xsl:for-each>
       </location>
 
-- 
1.7.9.5



More information about the subsurface mailing list