mirror of
https://github.com/corda/corda.git
synced 2025-01-20 19:49:25 +00:00
The unlink/_wunlink call will not delete directories, use remove/_wremove instead
This commit is contained in:
parent
c06dd28ea0
commit
0db1a2c414
@ -35,7 +35,7 @@
|
||||
# define STRUCT_STAT struct _stat
|
||||
# define MKDIR(path, mode) _wmkdir(path)
|
||||
# define CHMOD(path, mode) _wchmod(path, mode)
|
||||
# define UNLINK _wunlink
|
||||
# define REMOVE _wremove
|
||||
# define RENAME _wrename
|
||||
# define OPEN_MASK O_BINARY
|
||||
|
||||
@ -81,7 +81,7 @@ typedef wchar_t char_t;
|
||||
# define STRUCT_STAT struct stat
|
||||
# define MKDIR mkdir
|
||||
# define CHMOD chmod
|
||||
# define UNLINK unlink
|
||||
# define REMOVE remove
|
||||
# define RENAME rename
|
||||
# define OPEN_MASK 0
|
||||
|
||||
@ -386,7 +386,7 @@ Java_java_io_File_delete(JNIEnv* e, jclass, jstring path)
|
||||
{
|
||||
string_t chars = getChars(e, path);
|
||||
if (chars) {
|
||||
int r = UNLINK(chars);
|
||||
int r = REMOVE(chars);
|
||||
if (r != 0) {
|
||||
throwNewErrno(e, "java/io/IOException");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user