diff options
author | Joerg Bornemann <joerg.bornemann@trolltech.com> | 2009-08-24 10:59:36 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@trolltech.com> | 2009-08-24 13:31:54 +0200 |
commit | ce25f93071612a6a4fa578f52b1129b6551a5d3f (patch) | |
tree | 23a3471438f296681875733abb6b8f2f8e16f187 | |
parent | a41d614eb8afd7c1c5b95b8ac34335fc0aaf0a18 (diff) | |
download | qt4-tools-ce25f93071612a6a4fa578f52b1129b6551a5d3f.tar.gz |
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.
-rw-r--r-- | src/corelib/io/qfsfileengine_win.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index cfa0a497e5..4a0639d8d8 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; |