Andre Poenitz wrote:
On Sat, Oct 04, 2008 at 01:33:15PM +0200, Peter Kümmel wrote:
Abdelrazak Younes wrote:
temp_dir is the value returned by QDir::tempPath() therefore I think
this is a Qt bug.
I don't think this is a Qt bug as the doc says:
On Windows this is usually the path in the TEMP or TMP environment
variable.
Then I would say this is just the documentation of a bug, or, #
at least a bad API design.
On Vista, I have ('set' will gives you this):
TEMP=C:\Users\abdel\AppData\Local\Temp
And I guess that on XP you have:
TEMP=C:\DOKUME~1\cdev\LOKALE~1\Temp
Hence the bug. Maybe you could try to use QDir::temp() instead of
QDir::tempPath() to see if that's any better.
printf("---- %s\n", qPrintable(QDir::temp().absolutePath()));
printf("---- %s\n", qPrintable(QDir::temp().canonicalPath()));
isn't better. I know no other way to get the long name than to use the
win32 API.
Andre, do you have an idea?
I am not aware of a conversion between short and long.
But you state:
[...]fails due to different names of the same directory (prefixIs is string
based):
C:/Dokumente und Einstellungen/cdev/Lokale Einstellungen/Temp/lyx_tmpbuf0/
C:/DOKUME~1/cdev/LOKALE~1/Temp
Having several names for the same file or directory is not a Windows-only
problem but rather common on *nix systems where there might be symlinks
or mounts "distorting" the filesystem tree. Of course, finding (or
keeping track of) a canonical representation is not necessarilty
trivial and I'd consider it rather an 'application space' task, not a
Yes, it's similar to a symlink.
Then canonicalPath() should return the long path name.
library thing. Why do we end up with two representations anyway?
Also wondering why the other pathname is the long one, I found
os::internal_path() which alreday converts to the long path name.
Seems it WAS a well known problem:
http://www.lyx.org/trac/changeset/10501 (commit by Angus)
I use this function now in tempPath().
Peter