little bit of documentation

This commit is contained in:
Reinhard Pointner 2008-02-07 23:16:23 +00:00
parent 3c0296d11e
commit 11b4034a9e
1 changed files with 7 additions and 5 deletions

View File

@ -90,11 +90,13 @@ public class FileFormat {
public static String getName(File file) {
if (!file.getName().isEmpty()) {
return file.getName();
} else {
return file.toString();
}
String name = file.getName();
if (!name.isEmpty())
return name;
// file might be a drive (only has a path, but no name)
return file.toString();
}
}