summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@trolltech.com>2009-08-24 08:59:36 (GMT)
committerJoerg Bornemann <joerg.bornemann@trolltech.com>2009-08-24 11:31:54 (GMT)
commitce25f93071612a6a4fa578f52b1129b6551a5d3f (patch)
tree23a3471438f296681875733abb6b8f2f8e16f187 /src
parenta41d614eb8afd7c1c5b95b8ac34335fc0aaf0a18 (diff)
downloadQt-ce25f93071612a6a4fa578f52b1129b6551a5d3f.zip
Qt-ce25f93071612a6a4fa578f52b1129b6551a5d3f.tar.gz
Qt-ce25f93071612a6a4fa578f52b1129b6551a5d3f.tar.bz2
QFSFileEngine compile fix for NTFS symlink support
This also reverts my panic compile fixes, which just disabled the symlink code paths on Windows. This reverts commit e5fe8b49b08a6e749bde8581d9267ddafa7c9990. This reverts commit 7385c1fc7fe03836ed42cc783e840557d267cff9.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index cfa0a49..4a0639d 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -117,9 +117,12 @@ typedef struct _REPARSE_DATA_BUFFER {
} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
# define REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer)
-#ifndef MAXIMUM_REPARSE_DATA_BUFFER_SIZE
-# define MAXIMUM_REPARSE_DATA_BUFFER_SIZE 16384
-#endif
+# ifndef MAXIMUM_REPARSE_DATA_BUFFER_SIZE
+# define MAXIMUM_REPARSE_DATA_BUFFER_SIZE 16384
+# endif
+# ifndef IO_REPARSE_TAG_SYMLINK
+# define IO_REPARSE_TAG_SYMLINK (0xA000000CL)
+# endif
#endif
QT_BEGIN_NAMESPACE
@@ -1252,7 +1255,7 @@ bool QFSFileEnginePrivate::doStat() const
static QString readSymLink(const QString &link)
{
QString result;
-#if !defined(Q_OS_WINCE) && defined(FSCTL_GET_REPARSE_POINT) && defined(IO_REPARSE_TAG_MOUNT_POINT)
+#if !defined(Q_OS_WINCE)
HANDLE handle = CreateFile((wchar_t*)QFSFileEnginePrivate::longFileName(link).utf16(),
FILE_READ_EA,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
@@ -1513,7 +1516,7 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions() const
*/
bool QFSFileEnginePrivate::isSymlink() const
{
-#if !defined(Q_OS_WINCE) && defined(IO_REPARSE_TAG_SYMLINK)
+#if !defined(Q_OS_WINCE)
if (need_lstat) {
need_lstat = false;
is_link = false;