mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-13 01:22:41 +01:00
DroidFish: Made it possible to specify a full file path to the book file in preferences.
This commit is contained in:
@@ -1219,9 +1219,11 @@ public class DroidFish extends Activity implements GUIInterface {
|
||||
private final void setBookOptions() {
|
||||
BookOptions options = new BookOptions(bookOptions);
|
||||
if (options.filename.length() > 0) {
|
||||
File extDir = Environment.getExternalStorageDirectory();
|
||||
String sep = File.separator;
|
||||
options.filename = extDir.getAbsolutePath() + sep + bookDir + sep + options.filename;
|
||||
if (!options.filename.startsWith(sep)) {
|
||||
File extDir = Environment.getExternalStorageDirectory();
|
||||
options.filename = extDir.getAbsolutePath() + sep + bookDir + sep + options.filename;
|
||||
}
|
||||
}
|
||||
ctrl.setBookOptions(options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user