Skip to content

Leaves an unreadable .dropbox-dist directory in ~ #156

Description

@wjt

The wrapper creates a directory at ~/.dropbox-dist with permissions 0o000 to prevent Dropbox's built-in autoupdater from running:

def _disable_auto_updates(self):
# We ship updates to the dropbox app ourselves, so disable
# them by making the auto-update directory unreadable to
# prevent weird bugs from happening when mixing versions.
orig_dir = os.path.expanduser(DROPBOX_AUTOUPDATE_DIR)
if os.path.exists(orig_dir) and not os.access(orig_dir, os.W_OK):
logging.info("{} is already unaccessible. Nothing to do".format(orig_dir))
return
backup_dir = "{}.backup".format(orig_dir)
logging.info("Found auto-update directory in {}. Backing it up in {}".format(orig_dir, backup_dir))
if os.path.exists(backup_dir):
shutil.rmtree(backup_dir, ignore_errors=True)
if os.path.exists(orig_dir):
shutil.move(orig_dir, backup_dir)
logging.info("Disabling auto-updates by making {} unwritable".format(orig_dir))
os.mkdir(orig_dir, mode=0)

This is a little untidy. It made my backup a little bit sad, for example:

2020-09-14 15:42:38,517 - vorta.borg.borg_thread - WARNING - /sysroot/home/wjt/.dropbox-dist: scandir: [Errno 13] Permission denied: '/sysroot/home/wjt/.dropbox-dist'

Some other options:

  • Put a file there instead of an unreadable directory
  • Use --nofilesystem=~/.dropbox-dist --persist=.dropbox-dist to at least tuck it away in ~/.var/app/com.dropbox.Client
  • ???

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions