Skip to content

Commit 23f44bb

Browse files
committed
Do not throw when FileStore cannot create a dir.
There is a problem with the file structure on some devices. When we did the FileStore refactor, we turned a silent failure into a runtime exception, causing apps to crash on some of these devices. Although this does not fix the root problem, it reverts to the silent behaviour we had before. We still need to investigate the root cause of this.
1 parent df21954 commit 23f44bb

File tree

1 file changed

+7
-3
lines changed
  • firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/internal/persistence

1 file changed

+7
-3
lines changed

firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/internal/persistence/FileStore.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,16 @@ static boolean recursiveDelete(File fileOrDirectory) {
101101
return fileOrDirectory.delete();
102102
}
103103

104-
/** @return internal File used by Crashlytics, that is not specific to a session */
104+
/**
105+
* @return internal File used by Crashlytics, that is not specific to a session
106+
*/
105107
public File getCommonFile(String filename) {
106108
return new File(rootDir, filename);
107109
}
108110

109-
/** @return all common (non session specific) files matching the given filter. */
111+
/**
112+
* @return all common (non session specific) files matching the given filter.
113+
*/
110114
public List<File> getCommonFiles(FilenameFilter filter) {
111115
return safeArrayToList(rootDir.listFiles(filter));
112116
}
@@ -185,7 +189,7 @@ private static synchronized File prepareBaseDir(File file) {
185189
}
186190
}
187191
if (!file.mkdirs()) {
188-
throw new IllegalStateException("Could not create Crashlytics-specific directory: " + file);
192+
Logger.getLogger().d("Could not create Crashlytics-specific directory: " + file);
189193
}
190194
return file;
191195
}

0 commit comments

Comments
 (0)