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

Ignore errors when importing a .zip file #3126

Open
awsms opened this issue Oct 15, 2021 · 1 comment
Open

Ignore errors when importing a .zip file #3126

awsms opened this issue Oct 15, 2021 · 1 comment

Comments

@awsms
Copy link

awsms commented Oct 15, 2021

On +100 scripts, I've a few messing up the import (I realized it after checking the console).
Can't greasemonkey just ignore these scripts by default, instead of bugging out and halting the import process?

@EpicOrange
Copy link

EpicOrange commented Jan 13, 2023

Incidentally, mine errored because my userscript had a slash in its name. It breaks on this:

let folderName = file.name.substr(0, file.name.lastIndexOf('/'));
exportDetails = await zip.file(`${folderName}/.gm.json`)

The script name "Add left/right buttons" turns out to result in name = "Add left--right buttons/Add left/right buttons.user.js", and therefore folderName = "Add left--right buttons/Add left". That directory doesn't exist, so zip.file chokes.

That being said, the above file hasn't been updated since 2018, so I doubt this issue will get addressed.

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

2 participants