Conversation
Added some logic that allows for files with spaces in their name
| TEMP="" | ||
| elif [[ $TEMP == "" ]] | ||
| then | ||
| TEMP="$file " |
There was a problem hiding this comment.
space added here on purpose - don't think this will work if someone adds a file name with a double space in the name, but I think this covers most cases
|
Hi @scfast , thanks for the PR. I haven't worked with that file for a long time, so please bear with me. Did it give an error if the .docx file had a whitespace? If so, where in the script was the error? It looks like you have added some ad hoc code to deal with whitespaces, am I right? But that kind of code shouldn't be necessary, right? Just calling variables with "$file" or "$(foo)" instead of $file should fix the problem. So if that's the problem, that the script crashes when there's a whitespace in the file name, what I'd suggest is just checking whether there's an unquoted variable somewhere, and quoting it, instead of adding ad hoc code, specially if the code can deal with one but not more whitespaces. |
I'll double-check to be sure - I think both cases are causing issues, but I'll get some specifics for you |
Added some logic that allows for files with spaces in their name