termux-packages/x11-packages/fltk/fltk-1.3.4_src_Fl_File_Brow...

25 lines
1.2 KiB
Diff

diff -uNr fltk-1.3.4/src/Fl_File_Browser.cxx fltk-1.3.4.mod/src/Fl_File_Browser.cxx
--- fltk-1.3.4/src/Fl_File_Browser.cxx 2016-10-19 08:55:03.000000000 +0300
+++ fltk-1.3.4.mod/src/Fl_File_Browser.cxx 2017-12-10 15:19:04.555072795 +0200
@@ -624,13 +624,16 @@
// Open the file that contains a list of mounted filesystems...
//
- mtab = fl_fopen("/etc/mnttab", "r"); // Fairly standard
+ mtab = fl_fopen("/data/data/com.termux/files/usr/etc/mnttab", "r"); // Fairly standard
if (mtab == NULL)
- mtab = fl_fopen("/etc/mtab", "r"); // More standard
+ mtab = fl_fopen("/data/data/com.termux/files/usr/etc/mtab", "r"); // More standard
if (mtab == NULL)
- mtab = fl_fopen("/etc/fstab", "r"); // Otherwise fallback to full list
+ mtab = fl_fopen("/data/data/com.termux/files/usr/etc/fstab", "r"); // Otherwise fallback to full list
if (mtab == NULL)
- mtab = fl_fopen("/etc/vfstab", "r"); // Alternate full list file
+ mtab = fl_fopen("/data/data/com.termux/files/usr/etc/vfstab", "r"); // Alternate full list file
+
+ if (mtab == NULL)
+ mtab = fl_fopen("/proc/mounts", "r"); // Try to use /proc/mounts
if (mtab != NULL)
{