[Qt-interest] QDir::tempPath() printing junk on windows
Gary Coulbourne
gcoulbourne at mediaguide.com
Thu Feb 19 23:49:09 CET 2009
Willy P wrote:
> Gary,
> Thanks, but I'm passing this path to ffmpeg via QProcess::execute and
> ffmpeg is puking. How can I make it a "normal" path?
Apparently Windows (I'm a unix developer by trade, so I'm slightly out
of my depth) automatically uses the short form for TEMP directories to
be compatable with DOS batchfiles. Some programs don't support using
these old-format paths...
The solution is apparently a win32 function (non-portable, you'll need
to check if your code is being compiled on windows) called
getLongPathName() [
http://msdn.microsoft.com/en-us/library/aa364980(VS.85).aspx ]
can be used to do the conversion. Unfortunately, I don't know enough
about win32 to suggest a it's use beyond the documentation I linked.
Peace,
Gary
More information about the Qt-interest-old
mailing list