| 18 | #include <my_sys.h> |
| 19 | |
| 20 | int my_delete(const char *name, myf MyFlags) |
| 21 | { |
| 22 | int err; |
| 23 | DBUG_ENTER("my_delete"); |
| 24 | DBUG_PRINT("my",("name %s MyFlags %d", name, MyFlags)); |
| 25 | |
| 26 | if ((err = unlink(name)) == -1) |
| 27 | { |
| 28 | my_errno=errno; |
| 29 | if (MyFlags & (MY_FAE+MY_WME)) |
| 30 | { |
| 31 | char errbuf[MYSYS_STRERROR_SIZE]; |
| 32 | my_error(EE_DELETE, MYF(ME_BELL+ME_WAITTANG+(MyFlags & ME_NOINPUT)), |
| 33 | name, errno, my_strerror(errbuf, sizeof(errbuf), errno)); |
| 34 | } |
| 35 | } |
| 36 | else if ((MyFlags & MY_SYNC_DIR) && |
| 37 | my_sync_dir_by_file(name, MyFlags)) |
| 38 | err= -1; |
| 39 | DBUG_RETURN(err); |
| 40 | } /* my_delete */ |
| 41 | |
| 42 | #if defined(__WIN__) |
| 43 | /** |
no test coverage detected