qubes-session-autostart: handle error when reading a directory
Fixes QubesOS/qubes-issues#5043.
This commit is contained in:
parent
eac2e79483
commit
22a309d154
@ -60,7 +60,16 @@ def process_autostart(environments):
|
|||||||
# handle only "most important" entry
|
# handle only "most important" entry
|
||||||
processed_entries = {}
|
processed_entries = {}
|
||||||
for path in xdg.BaseDirectory.load_config_paths('autostart'):
|
for path in xdg.BaseDirectory.load_config_paths('autostart'):
|
||||||
for entry_name in os.listdir(path):
|
try:
|
||||||
|
entries = os.listdir(path)
|
||||||
|
except Exception as e:
|
||||||
|
print(
|
||||||
|
"Failed to process path '{}': {}".format(path, str(e)),
|
||||||
|
file=sys.stderr
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
|
||||||
|
for entry_name in entries:
|
||||||
if entry_name in processed_entries:
|
if entry_name in processed_entries:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user