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

Remove file extension only when present #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matthewfranglen
Copy link
Contributor

@matthewfranglen matthewfranglen commented Oct 19, 2016

If you name the machine to import without providing the extension then the old code will snip 4 characters off the end of the machine name.

Since the .zip extension is added to the name later it would be fine to just pass the machine name, if the behaviour was changed to only remove the extension when it exists. The regular expression used for removal matches the behaviour of the import.sh script (specifically "${filename%.*}").

If you name the machine to import without providing the extension then the old code will snip 4 characters off the end of the machine name.

Since the `.zip` extension is added to the name later it would be fine to just pass the machine name, if the behaviour was changed to only remove the extension when it exists. The regular expression used for removal matches the behaviour of the import.sh script (specifically `"${filename%.*}"`.
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

Successfully merging this pull request may close these issues.

1 participant