[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] [bugs #10485] File.Delete(string) throws an exception
From: |
Marcus Urban |
Subject: |
[Pnet-developers] [bugs #10485] File.Delete(string) throws an exception when the file does not exist |
User-agent: |
Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.4.21-144-athlon; X11; i686; en_US) (KHTML, like Gecko) |
This mail is an automated notification from the bugs tracker
of the project: DotGNU Portable.NET.
/**************************************************************************/
[bugs #10485] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10485>
Project: DotGNU Portable.NET
Submitted by: Marcus Urban
On: Fri 09/24/2004 at 00:38
Category: None
Severity: 5 - Average
Item Group: None
Resolution: None
Privacy: Public
Assigned to: None
Status: Open
Summary: File.Delete(string) throws an exception when the file does not exist
Original Submission: File.Delete(string) throws an exception when the file
does not exist. I think that it has something to do with the mapping of error
codes.
File.Delete() invokes a helper method, which returns an error code. If the
error code is that the file does not exist, everything is okay. Otherwise, an
exception is thrown.
The problem is that eventually ILDelete() is called, which first tries the
rmdir() function and then tries unlink(). If the file does not exist unlink()
returns ENOENT, which is the integer 2 on my system. However,
ILSysIOConvertErrno() converts this value to 1 (EPERM). So eventually
File.Delete() receives an error code corresponding to EPERM, when it should
instead receive ENOENT.
File Attachments
-------------------
-------------------------------------------------------
Date: Fri 09/24/2004 at 00:38 Name: test-delete.cs Size: 114B By: mathpup
Test case
http://savannah.gnu.org/bugs/download.php?item_id=10485&item_file_id=1700
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10485>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Pnet-developers] [bugs #10485] File.Delete(string) throws an exception when the file does not exist,
Marcus Urban <=