Fix "Support for AIX" - part 2 (#942)

Add missing file counter increment, thanks to @michaelbauerle.
This commit is contained in:
Albrecht Schlosser 2024-03-25 17:07:42 +01:00
parent 4742d830be
commit 5666ec0ff0

View File

@ -278,6 +278,7 @@ int Fl_Unix_System_Driver::file_browser_load_filesystem(Fl_File_Browser *browser
// We always have the root filesystem
browser->add("/", icon);
num_files++;
// Get the required buffer size for the vmount structures
res = mntctl(MCTL_QUERY, sizeof(len), (char *) &len);
if (!res) {
@ -299,6 +300,7 @@ int Fl_Unix_System_Driver::file_browser_load_filesystem(Fl_File_Browser *browser
if (strcmp("/", filename) != 0) {
strlcat(filename, "/", lname);
browser->add(filename, icon);
num_files++;
}
vp = (struct vmount *) ((char *) vp + vp->vmt_length);
}
@ -317,6 +319,7 @@ int Fl_Unix_System_Driver::file_browser_load_filesystem(Fl_File_Browser *browser
// We always have the root filesystem
browser->add("/", icon);
num_files++;
# ifdef HAVE_PTHREAD
// Lock mutex for thread safety
if (!pthread_mutex_lock(&getvfsstat_mutex)) {
@ -330,6 +333,7 @@ int Fl_Unix_System_Driver::file_browser_load_filesystem(Fl_File_Browser *browser
if (strcmp("/", filename) != 0) {
strlcat(filename, "/", lname);
browser->add(filename, icon);
num_files++;
}
}
} else {