From 4d0af395ee39db138bcbb72715c2e6564b15df4f Mon Sep 17 00:00:00 2001
From: "Glenn Y. Rolland" <glenux@glenux.net>
Date: Tue, 15 Mar 2011 16:57:02 +0000
Subject: [PATCH] sshfs-mapper config: Added default action.

git-svn-id: https://websvn.glenux.net/svn/Upoc/sshfs-mapper/trunk@1665 eaee96b3-f302-0410-b096-c6cfd47f7835
---
 sshfs-mapper/config.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sshfs-mapper/config.rb b/sshfs-mapper/config.rb
index a37916f..63ae5db 100644
--- a/sshfs-mapper/config.rb
+++ b/sshfs-mapper/config.rb
@@ -14,13 +14,13 @@ module SshfsMapper
 
 		attr_reader :maps_active
 		attr_reader :maps
+		attr_reader :action
 
 		ACTION_UMOUNT = :umount
 		ACTION_MOUNT = :mount
 		ACTION_INIT = :init
 
 		def initialize
-			@action = ACTION_MOUNT
 
 			user = if ENV['USER'] then
 					   ENV['USER']
@@ -40,6 +40,7 @@ module SshfsMapper
 						  home_dir + '/.config'
 					  end
 
+			@action = ACTION_MOUNT
 			@config_dir = xdg_dir + '/sshfs-mapper'
 			@config_file = nil
 			@maps = []
@@ -53,7 +54,7 @@ module SshfsMapper
 		def parse_file &blk
 			rdebug "Config: #{@config_dir}/config"
 
-			maps = []
+			@maps = []
 			Find.find( @config_dir ) do |path|
 				if File.file? path
 					if File.basename( path ) =~ /.map$/
@@ -68,7 +69,6 @@ module SshfsMapper
 					#total_size += FileTest.size(path)
 				end
 			end
-			return maps
 		end
 
 		def parse_cmd_line args