[Qt-interest] QDir::tempPath() printing junk on windows

Willy P willy.lists at gmail.com
Sat Feb 21 00:39:14 CET 2009


Well, I learned something.  It turned out not to be the problem but I
really appreciate your help.  I'm sure I'll need this bit of knowledge
down the road...

Thanks all,
-Willy

On Thu, Feb 19, 2009 at 2:49 PM, Gary Coulbourne
<gcoulbourne at mediaguide.com> wrote:
> 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