It is very easy to write a bash script that completely mishandles variables containing filenames with spaces, for example:
cp ${FILENAME} /tmp
Here you should have done:
cp "${FILENAME}" /tmp
Also, GNU make, still one of the cornerstones of building C and C++ libraries (since CMake and Autotools most commonly use that backend) cannot handle spaces in paths at all well.