Skip to content

Commit

Permalink
Fix "Support for AIX" - part 2 (#942)
Browse files Browse the repository at this point in the history
Add missing file counter increment, thanks to @michaelbauerle.
  • Loading branch information
Albrecht Schlosser committed Mar 25, 2024
1 parent 4742d83 commit 5666ec0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/drivers/Unix/Fl_Unix_System_Driver.cxx
Expand Up @@ -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) {
Expand All @@ -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);
}
Expand All @@ -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)) {
Expand All @@ -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 {
Expand Down

0 comments on commit 5666ec0

Please sign in to comment.