Convert rust_file_is_dir from estrs to cstrs. Issue #855
This commit is contained in:
@@ -444,9 +444,9 @@ rust_dirent_filename(rust_task *task, dirent* ent) {
|
||||
#endif
|
||||
|
||||
extern "C" CDECL int
|
||||
rust_file_is_dir(rust_task *task, rust_str *path) {
|
||||
rust_file_is_dir(rust_task *task, char *path) {
|
||||
struct stat buf;
|
||||
if (stat((char*)path->data, &buf)) {
|
||||
if (stat(path, &buf)) {
|
||||
return 0;
|
||||
}
|
||||
return S_ISDIR(buf.st_mode);
|
||||
|
||||
Reference in New Issue
Block a user