From: <lab...@us...> - 2009-03-30 22:30:05
|
Revision: 969 http://opengtoolkit.svn.sourceforge.net/opengtoolkit/?rev=969&view=rev Author: labviewer Date: 2009-03-30 22:29:43 +0000 (Mon, 30 Mar 2009) Log Message: ----------- Fixed a bug that prevented to open UNC paths Modified Paths: -------------- trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/lvutil.h trunk/lvzip/source/lvzlib.dll Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2009-02-28 16:25:29 UTC (rev 968) +++ trunk/lvzip/c_source/lvutil.c 2009-03-30 22:29:43 UTC (rev 969) @@ -343,6 +343,7 @@ int32 pathLen = -1; MgErr err = FPathToText(path, (LStrPtr)&pathLen); + DoDebugger(); if (!err) { *lstr = (LStrPtr)DSNewPClr(sizeof(int32) + pathLen + 1); @@ -551,6 +552,7 @@ extern MgErr ZEXPORT LVPath_OpenFile(LVRefNum *refnum, Path path, uInt8 rsrc, uInt32 openMode, uInt32 denyMode) { MgErr err; + int32 type; File ioRefNum; #if MacOS FSSpec fss; @@ -570,8 +572,11 @@ #endif *refnum = 0; - if (!FIsAPathOfType(path, fAbsPath)) - return mgArgErr; + if (err = FGetPathType(path, &type)) + return err; + + if ((type != fAbsPath) && (type != fUNCPath)) + return mgArgErr; #if MacOS if (err = MakeMacSpec(path, &fss)) Modified: trunk/lvzip/c_source/lvutil.h =================================================================== --- trunk/lvzip/c_source/lvutil.h 2009-02-28 16:25:29 UTC (rev 968) +++ trunk/lvzip/c_source/lvutil.h 2009-03-30 22:29:43 UTC (rev 969) @@ -250,6 +250,7 @@ MgErr FPathToPath(Path *p); MgErr FAppendName(Path path, PStr name); Bool32 FIsAPathOfType(Path path, int32 ofType); +MgErr FGetPathType(Path, int32*); int32 FDepth(Path path); MgErr FDisposePath(Path p); Modified: trunk/lvzip/source/lvzlib.dll =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |