summaryrefslogtreecommitdiffstats
path: root/qtools/qfileinfo_win32.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-06-15 11:11:10 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-06-15 11:11:10 (GMT)
commit1cbd7d2faa8d543f521b144a8120c3a1ba2f832f (patch)
treeb47b3252c432a415bf772add061e451f5782d6c7 /qtools/qfileinfo_win32.cpp
parent6d2875bda7b5416f2e8c72ec8677b7164de86187 (diff)
downloadDoxygen-1cbd7d2faa8d543f521b144a8120c3a1ba2f832f.zip
Doxygen-1cbd7d2faa8d543f521b144a8120c3a1ba2f832f.tar.gz
Doxygen-1cbd7d2faa8d543f521b144a8120c3a1ba2f832f.tar.bz2
Release-1.7.0
Diffstat (limited to 'qtools/qfileinfo_win32.cpp')
-rw-r--r--qtools/qfileinfo_win32.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/qtools/qfileinfo_win32.cpp b/qtools/qfileinfo_win32.cpp
index bfcc6ac..8f83107 100644
--- a/qtools/qfileinfo_win32.cpp
+++ b/qtools/qfileinfo_win32.cpp
@@ -25,6 +25,15 @@
#include "qdatetime.h"
#include "qdir.h"
+static void reslashify( QString& n )
+{
+ for ( int i=0; i<(int)n.length(); i++ )
+ {
+ if ( n[i] == '/' )
+ n[i] = '\\';
+ }
+}
+
void QFileInfo::slashify( QString& n )
{
for ( int i=0; i<(int)n.length(); i++ )
@@ -246,6 +255,7 @@ void QFileInfo::doStat() const
STATBUF *b = &that->fic->st;
that->fic->isSymLink = FALSE;
+#if defined(__CYGWIN32_)
int r;
r = STAT( QFile::encodeName(fn), b );
@@ -254,6 +264,18 @@ void QFileInfo::doStat() const
delete that->fic;
that->fic = 0;
}
+#else
+ QString file = fn;
+ reslashify(file);
+#ifdef QT_LARGEFILE_SUPPORT
+ if ( _wstati64( (wchar_t*) file.ucs2(), b ) == -1 ) {
+#else
+ if ( _wstat( (wchar_t*) file.ucs2(), b ) == -1 ) {
+#endif
+ delete that->fic;
+ that->fic = 0;
+ }
+#endif
}
/*!