summaryrefslogtreecommitdiffstats
path: root/wizards/source/template/Samples.xba
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/source/template/Samples.xba')
-rw-r--r--wizards/source/template/Samples.xba8
1 files changed, 7 insertions, 1 deletions
diff --git a/wizards/source/template/Samples.xba b/wizards/source/template/Samples.xba
index ba74199d72ba..28a7837d1457 100644
--- a/wizards/source/template/Samples.xba
+++ b/wizards/source/template/Samples.xba
@@ -129,7 +129,13 @@ Sub SaveCurrentStyles(oDocument as Object)
'This sub stores the current document in the user work directory
On Error Goto ErrorOcurred
aTempURL = GetPathSettings("Work", False)
- aTempURL = aTempURL & "/" & aTempFileName
+ Dim aRightMost as String
+ aRightMost = Right(aTempURL, 1)
+ if aRightMost = "/" Then
+ aTempURL = aTempURL & aTempFileName
+ Else
+ aTempURL = aTempURL & "/" & aTempFileName
+ End If
While FileExists(aTempURL)
aTempURL=Left(aTempURL,(Len(aTempURL)-4)) & "_1.stc"