Skip to content

Commit 06459e2

Browse files
committed
cowardly continue using ~/.msf4 until we have an actual reason to switch
1 parent facecb4 commit 06459e2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/msf/base/config.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,24 @@ def self.get_config_root
3333
return val
3434
end
3535

36+
# XXX Update this when there is a need to break compatibility
37+
config_dir_major = 4
38+
config_dir = ".msf#{config_dir_major}"
39+
3640
# Windows-specific environment variables
3741
['HOME', 'LOCALAPPDATA', 'APPDATA', 'USERPROFILE'].each do |dir|
3842
val = Rex::Compat.getenv(dir)
3943
if (val and File.directory?(val))
40-
return File.join(val, ".msf#{Metasploit::Framework::Version::MAJOR}")
44+
return File.join(val, config_dir)
4145
end
4246
end
4347

4448
begin
4549
# First we try $HOME/.msfx
46-
File.expand_path("~#{FileSep}.msf#{Metasploit::Framework::Version::MAJOR}")
50+
File.expand_path("~#{FileSep}#{config_dir}")
4751
rescue ::ArgumentError
4852
# Give up and install root + ".msfx"
49-
InstallRoot + ".msf#{Metasploit::Framework::Version::MAJOR}"
53+
InstallRoot + config_dir
5054
end
5155
end
5256

0 commit comments

Comments
 (0)