57 lines
1.7 KiB
Diff
57 lines
1.7 KiB
Diff
diff -uNr fltk-1.3.4/src/Fl_Preferences.cxx fltk-1.3.4.mod/src/Fl_Preferences.cxx
|
|
--- fltk-1.3.4/src/Fl_Preferences.cxx 2015-04-25 00:25:30.000000000 +0300
|
|
+++ fltk-1.3.4.mod/src/Fl_Preferences.cxx 2017-12-10 15:27:01.280525349 +0200
|
|
@@ -963,7 +963,8 @@
|
|
vendor_(0L),
|
|
application_(0L) {
|
|
|
|
- char filename[ FL_PATH_MAX ]; filename[0] = 0;
|
|
+ char filename[ FL_PATH_MAX ] = {0};
|
|
+
|
|
#ifdef WIN32
|
|
# define FLPREFS_RESOURCE "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
|
|
# define FLPREFS_RESOURCEW L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
|
|
@@ -1049,7 +1050,7 @@
|
|
break;
|
|
}
|
|
case SYSTEM:
|
|
- strcpy(filename, "/etc/fltk/");
|
|
+ strcpy(filename, "/data/data/com.termux/files/usr/etc/fltk/");
|
|
break;
|
|
}
|
|
snprintf(filename + strlen(filename), sizeof(filename) - strlen(filename),
|
|
@@ -1162,20 +1163,6 @@
|
|
fprintf( f, "; application: %s\n", application_ );
|
|
prefs_->node->write( f );
|
|
fclose( f );
|
|
-#if !(defined(__APPLE__) || defined(WIN32))
|
|
- // unix: make sure that system prefs are user-readable
|
|
- if (strncmp(filename_, "/etc/fltk/", 10) == 0) {
|
|
- char *p;
|
|
- p = filename_ + 9;
|
|
- do { // for each directory to the pref file
|
|
- *p = 0;
|
|
- fl_chmod(filename_, 0755); // rwxr-xr-x
|
|
- *p = '/';
|
|
- p = strchr(p+1, '/');
|
|
- } while (p);
|
|
- fl_chmod(filename_, 0644); // rw-r--r--
|
|
- }
|
|
-#endif
|
|
return 0;
|
|
}
|
|
|
|
@@ -1191,12 +1178,6 @@
|
|
if ( !s ) return 0;
|
|
*s = 0;
|
|
char ret = fl_make_path( path );
|
|
-#if !(defined(__APPLE__) || defined(WIN32))
|
|
- // unix: make sure that system prefs dir. is user-readable
|
|
- if (strncmp(path, "/etc/fltk/", 10) == 0) {
|
|
- fl_chmod(path, 0755); // rwxr-xr-x
|
|
- }
|
|
-#endif
|
|
strcpy( s, "/" );
|
|
return ret;
|
|
}
|