Skip to content

Commit a53341f

Browse files
committed
Added compatibility with dbvis <= 6
Checking for "config" folder existence if "config70" is not found.
1 parent e66cc00 commit a53341f

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

modules/post/multi/gather/dbvis_enum.rb

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,19 @@ def run
6363
end
6464

6565
unless file?(dbvis_file)
66-
print_error("File not found: #{dbvis_file}")
67-
return
66+
print_status("File not found: #{dbvis_file}")
67+
print_status("This could be an older version of dbvis, trying old path")
68+
when /linux/
69+
dbvis_file = "#{user_base}.dbvis/config/dbvis.xml"
70+
when /win/
71+
dbvis_file = user_profile + "\\.dbvis\\config\\dbvis.xml"
72+
end
73+
unless file?(dbvis_file)
74+
print_error("File not found: #{dbvis_file}")
75+
return
76+
end
6877
end
69-
78+
7079
db = {}
7180
print_status("Reading: #{dbvis_file}")
7281
dbfound = false

0 commit comments

Comments
 (0)