Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 38898 invoked from network); 20 Aug 2009 08:15:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Aug 2009 08:15:11 -0000 Received: (qmail 34047 invoked by uid 500); 20 Aug 2009 08:15:30 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 33959 invoked by uid 500); 20 Aug 2009 08:15:29 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 33950 invoked by uid 99); 20 Aug 2009 08:15:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Aug 2009 08:15:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Aug 2009 08:15:27 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E712E23888C5; Thu, 20 Aug 2009 08:15:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r806084 - /commons/sandbox/runtime/trunk/src/main/native/os/win32/pshm.c Date: Thu, 20 Aug 2009 08:15:05 -0000 To: commits@commons.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090820081505.E712E23888C5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mturk Date: Thu Aug 20 08:15:05 2009 New Revision: 806084 URL: http://svn.apache.org/viewvc?rev=806084&view=rev Log: Throw exception on failed remove Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/pshm.c Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/pshm.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/pshm.c?rev=806084&r1=806083&r2=806084&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/os/win32/pshm.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/os/win32/pshm.c Thu Aug 20 08:15:05 2009 @@ -89,7 +89,7 @@ rv = acr_ioh_close(shm); if (rv && IS_VALID_HANDLE(_E)) { - if (rv == EACCES) + if (ACR_STATUS_IS_EACCES(rv)) ACR_ThrowException(_E, THROW_NMARK, ACR_EX_ESECURITY, 0); else ACR_ThrowException(_E, THROW_NMARK, ACR_EX_EIO, rv); @@ -102,6 +102,12 @@ int rc = 0; if (!DeleteFileW(filename)) rc = ACR_GET_OS_ERROR(); + if (rc && IS_VALID_HANDLE(_E)) { + if (ACR_STATUS_IS_EACCES(rc)) + ACR_ThrowException(_E, THROW_NMARK, ACR_EX_ESECURITY, 0); + else + ACR_ThrowException(_E, THROW_NMARK, ACR_EX_EIO, rc); + } return rc; } @@ -243,7 +249,7 @@ x_free((void *)(shm->filename)); x_free(shm); if (IS_VALID_HANDLE(_E)) { - if (rc == EACCES) + if (ACR_STATUS_IS_EACCES(rc)) ACR_ThrowException(_E, THROW_NMARK, ACR_EX_ESECURITY, 0); else ACR_ThrowException(_E, THROW_NMARK, ACR_EX_EIO, rc);