From 6a60f4f13f0500cd33e315016a20e529ea40c398 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Wed, 6 Apr 2022 13:24:51 -0500 Subject: [PATCH] Code smell: redundant information of folder name and file name. --- .../NitterUser.class/instance/storeContents.st | 4 ++-- .../TwitterUser.class/class/reStoreDefinition.st | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Socialmetrica.package/NitterUser.class/instance/storeContents.st b/Socialmetrica.package/NitterUser.class/instance/storeContents.st index f8fbca1..3889172 100644 --- a/Socialmetrica.package/NitterUser.class/instance/storeContents.st +++ b/Socialmetrica.package/NitterUser.class/instance/storeContents.st @@ -6,8 +6,8 @@ storeContents dehidratated := self copy. dehidratated tweets: nil. objectString := STON toStringPretty: dehidratated. - directory := (FileLocator userData / 'Socialmetrica' / self userName) ensureCreateDirectory. - oldFile := directory / self userName, 'ston'. + directory := self folder ensureCreateDirectory. + oldFile := directory / 'profile', 'ston'. oldFile exists ifFalse: [ ^ MarkupFile exportAsFileOn: oldFile containing: objectString ]. diff --git a/Socialmetrica.package/TwitterUser.class/class/reStoreDefinition.st b/Socialmetrica.package/TwitterUser.class/class/reStoreDefinition.st index 275dcb1..98b1cf1 100644 --- a/Socialmetrica.package/TwitterUser.class/class/reStoreDefinition.st +++ b/Socialmetrica.package/TwitterUser.class/class/reStoreDefinition.st @@ -5,5 +5,5 @@ reStoreDefinition define: #userName as: String; define: #profileImageUrl as: String; define: #profileBio as: String; - define: #createdAt as: String; + "define: #createdAt as: String;" yourself. \ No newline at end of file