From 7ea4c54a9f5861bf8492f5e2f9d38757e804172a Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 31 Dec 2022 11:57:20 -0500 Subject: [PATCH] Improving default storage for notes. --- src/MiniDocs/LePage.extension.st | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/MiniDocs/LePage.extension.st b/src/MiniDocs/LePage.extension.st index 60971d2..e2560e0 100644 --- a/src/MiniDocs/LePage.extension.st +++ b/src/MiniDocs/LePage.extension.st @@ -48,9 +48,8 @@ LePage >> asMarkdeep [ { #category : #'*MiniDocs' } LePage >> asMarkdeepFile [ - | folder | - folder := self options at: 'storage' ifAbsent: [ FileLocator temp ]. - ^ self asMarkdeep exportAsFileOn: folder / self markdeepFileName + + ^ self asMarkdeep exportAsFileOn: self storage / self markdeepFileName ] { #category : #'*MiniDocs' } @@ -160,7 +159,7 @@ LePage >> metadataInit [ { #category : #'*MiniDocs' } LePage >> navTop [ | topNavFile | - topNavFile := ((self optionAt: 'storage' ifAbsentPut: [ FileLocator temp ]) / '_navtop.html'). + topNavFile := self storage / '_navtop.html'. topNavFile exists ifFalse: [ ^ '' ] ifTrue: [ ^ topNavFile contents ] @@ -212,7 +211,9 @@ LePage >> sharedVariablesBindings [ { #category : #'*MiniDocs' } LePage >> storage [ - - ^ self optionAt: 'storage' - ifAbsent: [ ^ FileLocator temp ] + | temporal | + temporal := (FileLocator temp / 'lepiter') ensureCreateDirectory. + self optionAt: 'storage' ifAbsent: [ ^ temporal ]. + (self optionAt: 'storage') ifNil: [ ^ temporal ]. + ^ self optionAt: 'storage' ]