-
Notifications
You must be signed in to change notification settings - Fork 26
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
ShellAnything Errors out when opening a context on Google Docs/Sheets/etc #121
Comments
Hi. Sorry for the late reply. Congratulation for finding this and thank you for reporting it. Shell anything tries to read the first bytes of the selected file to properly detect the file's mimetype. This is a new feature similar to Unix's file command. Base on this result, menus can be hidden or showed. I think you are the first one to encounter and report this bug. I think this is because your selected file is open in your editor. The file cannot be read because it is locked by another process, probably from your file editor or the process who synchronize your directory/file with your Google drive. If Shell anything encounter such error while trying to peak into a file, an error message should not be displayed. Shell anything should expect an "unknown" mimetype and continue with normal behavior. I have other Thank you. EDIT: Typos. |
…. Now logging errors instead of showing a popup error message. #121
I created more unit tests in 54de08c to reproduce your issue with a "file lock" error. I was not able to reproduce your observation (I do not have a Google Drive). Even when the file is locked by the operating system, the magic library does not fail as you observed. In my last commit, I have modified how ShellAnything deals with errors related to magic library. It is now logging errors to the error log file instead of showing a popup error message. This will solve the unexpected error prompt to users. If you right-click on a locked file, ShellAnything now generates the following properties:
I am unable to find a fix for Spreadsheet files on Google Drive. These files may be "unreadable" similar to when a file is locked. If the magic library cannot read the file I think there are no workaround. The magic library needs to be able to read the beginning of a file to detect "what" the file is. If you try to right-click on a file on your Goodle Drive, you should see an error in your log files. For example: |
Fixed. |
Describe the bug
When right clicking on any Google Document (.gdocs/.gsheet/etc) a dialog opens up stating there was a problem opening the file. The dialog appears three times in total. After you close them all, the context menu opens normally including all of the ShellAnything entries.
To Reproduce
Expected behavior
Context menu opens without erring out.
Screenshots
![Photo of the error dialog](https://user-images.githubusercontent.com/8950185/220732895-8238a3f5-204f-4eae-9e28-2f485a4fb26f.png)
The Error Dialog
Environment
Additional context
The text was updated successfully, but these errors were encountered: