[Amizilla-cvs] amizilla/nsprpub/pr/src/md/amiga adir.c,1.5,1.6
Brought to you by:
maxlarsson
From: Jeff S. <jsh...@us...> - 2004-11-28 00:20:16
|
Update of /cvsroot/amizilla/amizilla/nsprpub/pr/src/md/amiga In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29033 Modified Files: adir.c Log Message: More error checking. Index: adir.c =================================================================== RCS file: /cvsroot/amizilla/amizilla/nsprpub/pr/src/md/amiga/adir.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** adir.c 1 Jul 2004 17:32:16 -0000 1.5 --- adir.c 27 Nov 2004 23:37:30 -0000 1.6 *************** *** 50,54 **** --- 50,58 ---- return PR_SUCCESS; } + } else { + PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); } + } else { + PR_SetError(PR_FILE_NOT_FOUND_ERROR, 0); } *************** *** 73,76 **** --- 77,87 ---- } return md->info->fib_FileName; + } else { + int err = IoErr(); + if (err == ERROR_NO_MORE_ENTRIES) { + PR_SetError(PR_NO_MORE_FILES_ERROR, 0); + } else { + _MD_MapIOErr(err); + } } *************** *** 97,100 **** --- 108,117 ---- BPTR lock; + if ((lock = Lock(name, SHARED_LOCK)) != NULL) { + UnLock(lock); + PR_SetError(PR_FILE_EXISTS_ERROR, 0); + return PR_FAILURE; + } + if((lock = CreateDir(name)) != (BPTR)NULL) { UnLock(lock); |