mirror of
https://github.com/androidx/media.git
synced 2025-05-12 18:19:50 +08:00
Set cause of the exceptions in AtomicFile.startWrite()
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=173388899
This commit is contained in:
parent
3c201a0491
commit
8b3ec4800c
@ -104,12 +104,12 @@ public final class AtomicFile {
|
|||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
File parent = baseName.getParentFile();
|
File parent = baseName.getParentFile();
|
||||||
if (!parent.mkdirs()) {
|
if (!parent.mkdirs()) {
|
||||||
throw new IOException("Couldn't create directory " + baseName);
|
throw new IOException("Couldn't create directory " + baseName, e);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
str = new AtomicFileOutputStream(baseName);
|
str = new AtomicFileOutputStream(baseName);
|
||||||
} catch (FileNotFoundException e2) {
|
} catch (FileNotFoundException e2) {
|
||||||
throw new IOException("Couldn't create " + baseName);
|
throw new IOException("Couldn't create " + baseName, e2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user