file_name appending '&noauth=true' to variable
See original GitHub issueHi,
I’m new to XenServer and this little utility is a beauty. On XenServer 7 there is a bug though at file_name var construction as the url contains “&noauth=true” at the end.
On line 325:
file_name = url.split('/')[-1]
I’ve added
file_name = file_name('&')[0]
just thereafter but I think a more proper test should be coded.
ex:
if file_name.find('&')
file_name = file_name('&')[0]
Thanks again. Joseph.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Append to variable filename in Bash - Stack Overflow
I have tried it in ${} , $() , "" . Is this not an escaping issue? bash · zsh.
Read more >bash - Appending a current date from a variable to a filename
Execute the date command, passing in the Y, m, d, H, M, S flags to configure the output. Place the result into the...
Read more >[HELP] Appending dta files and generatinig filename variable
However I want to add a variable that reflects the original filename of the source. I know this can be done with the...
Read more >How to insert a variable into filename - Academy Feedback
Right now i have a variable(vfilename) with the current date and time as value. How can i append the pdf file name with...
Read more >Dynamically append text to filenames in Bash - Super User
This is because the ${file} variable contains the filename including the extension. I'm running Cygwin on top of Windows. I'm not sure how...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hello,
i found a solution for this issue,
just add the following after (line 325) file_name = url.split(‘/’)[-1]
the following file_name = file_name.split(‘&’)[0]
kind regards
Hi, may be using this code: file_name = re.match(r’^.*?.zip’, file_name).group(0)