Skip to content

Commit 0458e66

Browse files
committed
IO-319 Simplify; no need for boolean var.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1326678 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7664bff commit 0458e66

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/main/java/org/apache/commons/io/FileUtils.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,14 +2376,11 @@ public static long sizeOfDirectory(File directory) {
23762376
return 0L;
23772377
}
23782378
for (final File file : files) {
2379-
boolean isSymLink;
23802379
try {
2381-
isSymLink = isSymlink(file);
2380+
if (!isSymlink(file)) {
2381+
size += sizeOf(file);
2382+
}
23822383
} catch (IOException ioe) {
2383-
isSymLink = true;
2384-
}
2385-
if (!isSymLink) {
2386-
size += sizeOf(file);
23872384
}
23882385
}
23892386

0 commit comments

Comments
 (0)