diff --git a/shell_integration/nautilus/syncstate.py b/shell_integration/nautilus/syncstate.py index bef94e56c54..4453a82b9c6 100644 --- a/shell_integration/nautilus/syncstate.py +++ b/shell_integration/nautilus/syncstate.py @@ -293,8 +293,8 @@ def legacy_menu_items(self, files): # and we definitely don't want to show them for IGNORED. shareable = False state = entry['state'] - state_ok = state.startswith('OK') - state_sync = state.startswith('SYNC') + state_ok = state and state.startswith('OK') + state_sync = state and state.startswith('SYNC') if state_ok: shareable = True elif state_sync and isDir: