mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8203680: os::stat() on Posix platform does not need to copy input path
Reviewed-by: hseigel, dholmes
This commit is contained in:
parent
79fea6b201
commit
6f462fbc70
9 changed files with 10 additions and 56 deletions
|
@ -5378,16 +5378,6 @@ bool os::message_box(const char* title, const char* message) {
|
|||
return buf[0] == 'y' || buf[0] == 'Y';
|
||||
}
|
||||
|
||||
int os::stat(const char *path, struct stat *sbuf) {
|
||||
char pathbuf[MAX_PATH];
|
||||
if (strlen(path) > MAX_PATH - 1) {
|
||||
errno = ENAMETOOLONG;
|
||||
return -1;
|
||||
}
|
||||
os::native_path(strcpy(pathbuf, path));
|
||||
return ::stat(pathbuf, sbuf);
|
||||
}
|
||||
|
||||
// Is a (classpath) directory empty?
|
||||
bool os::dir_is_empty(const char* path) {
|
||||
DIR *dir = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue