Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Apple] An update reinstall fails due to .DS_Store #257

Open
SimonBenAnderson opened this issue Sep 4, 2023 · 1 comment
Open

[Apple] An update reinstall fails due to .DS_Store #257

SimonBenAnderson opened this issue Sep 4, 2023 · 1 comment

Comments

@SimonBenAnderson
Copy link
Contributor

When updating mGear using the Drag and Drop file on a Mac device, the update fails due to .DS_Store file already existing

This is due to the OS creating these files when a folder gets a files added, or has some attributes applied to it.
This results in shutil failing at

shutil.move(os.path.join(

@SimonBenAnderson
Copy link
Contributor Author

A possible solution that results in a working install, and user feedback

We could wrap the shutil.move in a try, except and catch any OS Errors.

# -- move the folder to the install path
            try:
                shutil.move(os.path.join(
                    install_path, "mgear", item), install_path)
                self.update_logging_widget("Moved: {0}".format(
                    os.path.join(install_path, item)))
            except OSError as err:
                self.update_logging_widget("Failed to move: {0}".format(
                    os.path.join(install_path, item)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant