Why are spaces not permitted in paths to the installation directory?

  • The source code (installer-framework/src/sdk/installerbasecommons.cpp) disallows spaces in pathnames to the installation target directory:

    QString ambiguousChars = QLatin1String("[~<>|?*!@#$%^&:,; ]");

    Why is this so? On Windows installers this doesn't allow placing the installed code in the "ApplicationsDir" directory (e.g. "C:\Program Files" or "C:\Program Files (x86)".

    Why is spaces in pathnames prohibited?

    Is there a workaround to this limitation that allows getting past it?

  • Moderators

    Hi, and welcome to the Qt Dev Net!

    That sounds like a very strange limitation indeed. You can submit a request to change this behaviour at https://bugreports.qt-project.org/

  • Most likely that is due to qmake acting up sometimes when Qt is in a path with spaces.

    Please consider to push a fix into https://codereview.qt-project.org/ and I am sure that will either get accepted or you will get a reply saying why it can not be done.

Log in to reply