Skip to content

correctly strip extension from filename in extract_cmd and back_up_file functions#3705

Merged
boegel merged 4 commits intoeasybuilders:developfrom
branfosj:strip
May 27, 2021
Merged

correctly strip extension from filename in extract_cmd and back_up_file functions#3705
boegel merged 4 commits intoeasybuilders:developfrom
branfosj:strip

Conversation

@branfosj
Copy link
Copy Markdown
Member

@branfosj branfosj commented May 27, 2021

If the original module file is named 2020a.lua then the backup generated will start with 2020.bak_. This is because rstrip('.lua') removes any of the characters ., l, u, or a found at the end of the string until it hits a character that is not one of those.

I've searched the framework and these look to be the only problematic uses of rstrip.

@boegel boegel added this to the 4.4.0 milestone May 27, 2021
@boegel boegel changed the title Correctly strip the string correctly strip extension from filename in extract_cmd and back_up_file functions May 27, 2021
… error message for extension stripping in test for back_up_file
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel boegel merged commit 2b4db47 into easybuilders:develop May 27, 2021
@branfosj branfosj deleted the strip branch May 27, 2021 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants