Upgrade replaces files, not folders

Issue #3 resolved
Rick Barrett created an issue

Upgrading an installed plugin overwrites the individual files in the new download, but leaves any files from the original install that are no longer part of the package. This could be a problem if for instance a plugin is upgraded from python to C++ - the python version would still be in the directory and registering the id.

Comments (3)

  1. Rick Barrett reporter

    Fixed in e15c8f8

    We now loop to determine the base directories of the installation (top level directories beneath the target directory for the type), and check if those exist. If they do, we ask for permission, and when granted we archive the entire directory.

    The flip side is that now we always archive the whole directory even if it's not necessary. But that's probably best to ensure we have the newest file set.

  2. Rick Barrett reporter

    Upon further review, I changed this so that it only replaces the whole directory if the attribute replaceall is present and its value is True.

    Without this tweak, I couldn't for instance set adddir="BretScripts" on all of Bret's individual scripts so they all installed into the same subfolder.

  3. Log in to comment