summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystemengine_win.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-06-29 12:35:01 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-07-07 21:39:12 +0000
commitfd95ef765afa3b0fd9996a31546d098465b927fe (patch)
tree4556cdfefd54b00ac68865a4e552dbe44a82b5ab /src/corelib/io/qfilesystemengine_win.cpp
parent353fb118c3d92bac2bfdd88922320d0d3e8563c2 (diff)
QFile::rename: avoid two stat(2)/CreateFile in a row
QFileSystemEngine::id() will stat(2)/CreateFile in order to get the ID of the file anyway, so we don't need to use QFile::exists() to check if the destination exists. Instead, rely on id() returning a null value to indicate error. On Windows, it's possible that the calls to either GetFileInformationByHandle or GetFileInformationByHandleEx might fail, but we ignore those. Change-Id: I1eba2b016de74620bfc8fffd14ccaebcbed64419 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'src/corelib/io/qfilesystemengine_win.cpp')
0 files changed, 0 insertions, 0 deletions