[Qt-interest] QFile::remove() fails on Windows Vista
Thiago Macieira
thiago.macieira at trolltech.com
Mon Jun 22 16:21:23 CEST 2009
Yevgen Muntyan wrote:
>Hey,
>
>I have a problem with QFile::rename: it fails when it tries to remove
> the temporary file it uses, because DeleteFileW() fails inside
>QFSFileEngine::remove(). My code is roughly the following:
>
>QFile source(":/gap/ggap.g");
>source.copy("C:/Users/muntyan/AppData/Local/Temp/ggap-000025cb/ggap.g")
>
>The copy() call here fails.
>"C:/Users/muntyan/AppData/Local/Temp/ggap-000025cb" directory is created
>with QDir::mkdir(), and I do have permissions to delete files from it,
> and I can delete files from it in explorer. The temporary files
> qt_temp.XXXXXX are not read-only, so DeleteFile() isn't supposed to
> fail. But it does!
>
>Any idea what's going on and how to rename files so that it works on
> Vista?
We've fixed a couple of issues with renaming temporary files for Qt 4.5.2.
Can you test the current 4.5 sources from Git, or try 4.5.2 as soon as
it's out and let us know if your problem has been fixed?
--
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Product Manager - Nokia, Qt Software
Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090622/42ec87f6/attachment.bin
More information about the Qt-interest-old
mailing list