Improving instance creation for checking if folder is not empty.
This commit is contained in:
parent
c1ff0e0243
commit
c827dfecd0
@ -22,6 +22,7 @@ Class {
|
|||||||
TiddlyWiki class >> createFromRemote: aRemoteTWUrl in: aFolder [
|
TiddlyWiki class >> createFromRemote: aRemoteTWUrl in: aFolder [
|
||||||
|
|
||||||
| wiki |
|
| wiki |
|
||||||
|
aFolder hasChildren ifTrue: [ ^ nil ].
|
||||||
wiki := TiddlyWiki new
|
wiki := TiddlyWiki new
|
||||||
remote: aRemoteTWUrl;
|
remote: aRemoteTWUrl;
|
||||||
folder: aFolder;
|
folder: aFolder;
|
||||||
@ -35,7 +36,7 @@ TiddlyWiki class >> createFromRemote: aRemoteTWUrl in: aFolder named: aNameStrin
|
|||||||
|
|
||||||
| wiki |
|
| wiki |
|
||||||
wiki := self createFromRemote: aRemoteTWUrl in: aFolder.
|
wiki := self createFromRemote: aRemoteTWUrl in: aFolder.
|
||||||
^ wiki name: aNameString
|
^ wiki ifNotNil: [ ^ wiki name: aNameString ]
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
|
Loading…
Reference in New Issue
Block a user