From 89049c1338c6ecd9951753bf00a24ab479723149 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 27 Feb 2011 15:38:05 -0300 Subject: Init: creating/cloning repository and other changes --- lib/backend/recipients_store.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/backend/recipients_store.rb') diff --git a/lib/backend/recipients_store.rb b/lib/backend/recipients_store.rb index 16b063b..2dab533 100644 --- a/lib/backend/recipients_store.rb +++ b/lib/backend/recipients_store.rb @@ -48,10 +48,18 @@ module Backend write() end + def getPath() + File.join(@baseDir, "config", "recipients") + end + + def hasPath?() + File.directory?(getPath()) + end + private def read() - fileName = File.join(@baseDir, "config", "recipients") + fileName = getPath() file = File.new(fileName, "r") begin recipients = [] @@ -72,7 +80,7 @@ module Backend end def write() - fileName = File.join(@baseDir, "config", "recipients") + fileName = getPath() file = File.new(fileName, "w") begin @recipients.each do |recipient| -- cgit v1.2.3