diff options
author | vincentdarley <vincentdarley> | 2002-12-04 13:09:23 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2002-12-04 13:09:23 (GMT) |
commit | 8e711fbc8f9fa92e577821c9c5243bbd4c1d6a8c (patch) | |
tree | ece8c5fb3e39618118a34fe0c86c472597b8cf16 /generic/tclIOUtil.c | |
parent | 3ec15d47f45aee77ef86ca5943b8c7624c37718c (diff) | |
download | tcl-8e711fbc8f9fa92e577821c9c5243bbd4c1d6a8c.zip tcl-8e711fbc8f9fa92e577821c9c5243bbd4c1d6a8c.tar.gz tcl-8e711fbc8f9fa92e577821c9c5243bbd4c1d6a8c.tar.bz2 |
filesystem cleanup fix, virtual filesystem load fix
Diffstat (limited to 'generic/tclIOUtil.c')
-rw-r--r-- | generic/tclIOUtil.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 334c569..059348d 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.65 2002/08/16 13:37:49 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.66 2002/12/04 13:09:24 vincentdarley Exp $ */ #include "tclInt.h" @@ -2570,23 +2570,26 @@ Tcl_FSLoadFile(interp, pathPtr, sym1, sym2, proc1Ptr, proc2Ptr, if (TclCrossFilesystemCopy(interp, pathPtr, copyToPtr) == TCL_OK) { + Tcl_LoadHandle newLoadHandle = NULL; + Tcl_FSUnloadFileProc *newUnloadProcPtr = NULL; + FsDivertLoad *tvdlPtr; + int retVal; + +#if !defined(__WIN32__) && !defined(MAC_TCL) /* * Do we need to set appropriate permissions * on the file? This may be required on some * systems. On Unix we could loop over * the file attributes, and set any that are - * called "-permissions" to 0777. Or directly: - * - * Tcl_Obj* perm = Tcl_NewStringObj("0777",-1); - * Tcl_IncrRefCount(perm); - * Tcl_FSFileAttrsSet(NULL, 2, copyToPtr, perm); - * Tcl_DecrRefCount(perm); - * + * called "-permissions" to 0700. However, + * we just do this directly, like this: */ - Tcl_LoadHandle newLoadHandle = NULL; - Tcl_FSUnloadFileProc *newUnloadProcPtr = NULL; - FsDivertLoad *tvdlPtr; - int retVal; + + Tcl_Obj* perm = Tcl_NewStringObj("0700",-1); + Tcl_IncrRefCount(perm); + Tcl_FSFileAttrsSet(NULL, 2, copyToPtr, perm); + Tcl_DecrRefCount(perm); +#endif retVal = Tcl_FSLoadFile(interp, copyToPtr, sym1, sym2, proc1Ptr, proc2Ptr, |