Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fail only if file cannot be created if it does not exist
Signed-off-by: tobiasKaminsky <[email protected]>
  • Loading branch information
tobiasKaminsky committed Jul 24, 2019
commit 37646ebb561e1fcbfc1e2ff95a1b218dc1d47af8
6 changes: 4 additions & 2 deletions src/androidTest/java/com/owncloud/android/AbstractIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ public String createFile(String name) throws IOException {

File file = new File(tempDir + File.separator + name);

if (!file.createNewFile()) {
throw new IOException("Cannot create file: " + file.getAbsolutePath());
if (!file.exists()) {
if (!file.createNewFile()) {
throw new IOException("Cannot create file: " + file.getAbsolutePath());
}
}

assertTrue(file.exists());
Expand Down