Skip to content

Commit

Permalink
change statement
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroZ committed May 20, 2019
1 parent fc13d84 commit 723ac16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Windows/lazagne/softwares/browsers/chromium_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,21 @@ def _get_database_dirs(self):
if os.path.exists(profiles_path):
# List all users profile (empty string means current dir, without a profile)
profiles = {'Default', ''}

# Automatic join all other additional profiles
for dirs in os.listdir(path):
dirs_path = os.path.join(path, dirs)
if (os.path.isdir(dirs_path) == True) & (dirs.startswith('Profile')):
if (os.path.isdir(dirs_path) == True) and (dirs.startswith('Profile')):
profiles.extend(dirs)

with open(profiles_path) as f:
try:
data = json.load(f)
# Add profiles from json to Default profile. set removes duplicates
profiles |= set(data['profile']['info_cache'])
except Exception:
pass

# Each profile has its own password database
for profile in profiles:
# Some browsers use names other than "Login Data"
Expand Down

0 comments on commit 723ac16

Please sign in to comment.