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) { public static String getName(File file) {
if (!file.getName().isEmpty()) { String name = file.getName();
return file.getName();
} else { if (!name.isEmpty())
return file.toString(); return name;
}
// file might be a drive (only has a path, but no name)
return file.toString();
} }
} }