Browse Source

Sicherheitsüberprüfung bei tempPath-Variable in Resources.java, ob existiert und erstellen, falls nicht existiert.

pull/2/head
yl60lepu 4 years ago
parent
commit
e582316857
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      app/src/main/java/de/yannicpunktdee/yoshibot/utils/Resources.java

+ 8
- 1
app/src/main/java/de/yannicpunktdee/yoshibot/utils/Resources.java View File

@ -23,7 +23,7 @@ public final class Resources {
private static String configPath;
@Getter
private static String audioPath;
@Getter
private static String tempPath;
@Getter
private static String activitiesPath;
@ -137,6 +137,13 @@ public final class Resources {
return false;
}
}
public static String getTempPath(){
File tempDir = new File(tempPath);
if(!tempDir.isDirectory())
if(!tempDir.mkdir()) return null;
return tempPath;
}
private static boolean initActivities() {
activitiesPath = verifyExists(resourcePath + "activities.txt", File::isFile);


Loading…
Cancel
Save