diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-10 10:04:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-10 10:04:13 (GMT) |
commit | 4cc39eb0353b0c510d6e501b0ea911b913e31e29 (patch) | |
tree | 9fdaac41f7da6119e756d9b2c0a6dec6818919c2 /win | |
parent | 7cbe68b036c355fa147816e3c4fc90265cfab001 (diff) | |
parent | b0d2108c0787bde409bec331a388113f6acb9450 (diff) | |
download | tcl-4cc39eb0353b0c510d6e501b0ea911b913e31e29.zip tcl-4cc39eb0353b0c510d6e501b0ea911b913e31e29.tar.gz tcl-4cc39eb0353b0c510d6e501b0ea911b913e31e29.tar.bz2 |
merge trunk
Diffstat (limited to 'win')
-rw-r--r-- | win/Makefile.in | 2 | ||||
-rw-r--r-- | win/tclWinFile.c | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/win/Makefile.in b/win/Makefile.in index 39d34dd..d0e14c6 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -751,7 +751,7 @@ packages: if [ ! -f $(PKG_DIR)/$$pkg/Makefile ]; then \ ( cd $(PKG_DIR)/$$pkg; \ echo "Configuring package '$$i' wd = `pwd -P`"; \ - $$i/configure --with-tcl=$(PWD) --with-tclinclude=$(GENERIC_DIR) $(PKG_CFG_ARGS) --enable-shared --enable-threads; ) \ + $$i/configure --with-tcl=$$builddir --with-tclinclude=$(GENERIC_DIR) $(PKG_CFG_ARGS) --enable-shared --enable-threads; ) \ fi ; \ echo "Building package '$$pkg'"; \ ( cd $(PKG_DIR)/$$pkg; $(MAKE); ) \ diff --git a/win/tclWinFile.c b/win/tclWinFile.c index a1189f5..a4512ec 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -160,7 +160,7 @@ static unsigned short NativeStatMode(DWORD attr, int checkLinks, int isExec); static int NativeIsExec(const TCHAR *path); static int NativeReadReparse(const TCHAR *LinkDirectory, - REPARSE_DATA_BUFFER *buffer); + REPARSE_DATA_BUFFER *buffer, DWORD desiredAccess); static int NativeWriteReparse(const TCHAR *LinkDirectory, REPARSE_DATA_BUFFER *buffer); static int NativeMatchType(int isDrive, DWORD attr, @@ -444,7 +444,7 @@ TclWinSymLinkCopyDirectory( DUMMY_REPARSE_BUFFER dummy; REPARSE_DATA_BUFFER *reparseBuffer = (REPARSE_DATA_BUFFER *) &dummy; - if (NativeReadReparse(linkOrigPath, reparseBuffer)) { + if (NativeReadReparse(linkOrigPath, reparseBuffer, GENERIC_READ)) { return -1; } return NativeWriteReparse(linkCopyPath, reparseBuffer); @@ -542,7 +542,7 @@ WinReadLinkDirectory( if (!(attr & FILE_ATTRIBUTE_REPARSE_POINT)) { goto invalidError; } - if (NativeReadReparse(linkDirPath, reparseBuffer)) { + if (NativeReadReparse(linkDirPath, reparseBuffer, 0)) { return NULL; } @@ -663,12 +663,13 @@ WinReadLinkDirectory( static int NativeReadReparse( const TCHAR *linkDirPath, /* The junction to read */ - REPARSE_DATA_BUFFER *buffer)/* Pointer to buffer. Cannot be NULL */ + REPARSE_DATA_BUFFER *buffer,/* Pointer to buffer. Cannot be NULL */ + DWORD desiredAccess) { HANDLE hFile; DWORD returnedLength; - hFile = CreateFile(linkDirPath, GENERIC_READ, 0, NULL, OPEN_EXISTING, + hFile = CreateFile(linkDirPath, desiredAccess, 0, NULL, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, NULL); if (hFile == INVALID_HANDLE_VALUE) { |