Skip to content

Commit ed68839

Browse files
authored
Merge pull request markzhai#107 from kylin17/master
[fix]Fix the error of writing logs on some api level of Android devic…
2 parents 537e903 + 1e72749 commit ed68839

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

blockcanary-analyzer/src/main/java/com/github/moduth/blockcanary/BlockCanaryInternals.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static String getPath() {
124124
&& Environment.getExternalStorageDirectory().canWrite()) {
125125
return Environment.getExternalStorageDirectory().getPath() + logPath;
126126
}
127-
return Environment.getDataDirectory().getAbsolutePath() + BlockCanaryInternals.getContext().providePath();
127+
return getContext().provideContext().getFilesDir() + BlockCanaryInternals.getContext().providePath();
128128
}
129129

130130
static File detectedBlockDirectory() {

0 commit comments

Comments
 (0)