little bit of documentation
This commit is contained in:
parent
3c0296d11e
commit
11b4034a9e
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue