In Portal for ArcGIS you are allowed to create folders with spaces

But if I try to publish a layer to any of these directories with space I get an error informing me that the folder contains invalid characters?

The annoying thing is that I can publish it to a folder that does not contain spaces and then move it with Portal but can't do it from ArcGIS Pro!
Am I missing something?
Thanks
Dean