projects
/
jSite2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
return null is base path is not a directory
[jSite2.git]
/
src
/
net
/
pterodactylus
/
jsite
/
project
/
Project.java
diff --git
a/src/net/pterodactylus/jsite/project/Project.java
b/src/net/pterodactylus/jsite/project/Project.java
index
f6314cb
..
4d778ab
100644
(file)
--- a/
src/net/pterodactylus/jsite/project/Project.java
+++ b/
src/net/pterodactylus/jsite/project/Project.java
@@
-281,11
+281,16
@@
public class Project extends AbstractBean {
* path. This method is disk-intensive and may take some time on larger
* directories!
*
* path. This method is disk-intensive and may take some time on larger
* directories!
*
- * @return The file for the base path
+ * @return The file for the base path, or <code>null</code> if the base
+ * path does not denote an existing directory
*/
public ProjectFile getBaseFile() {
*/
public ProjectFile getBaseFile() {
+ File basePathFile = new File(basePath);
+ if (!basePathFile.exists() || !basePathFile.isDirectory()) {
+ return null;
+ }
ProjectFileImpl rootProjectFile = new ProjectFileImpl(null, "", true, false);
ProjectFileImpl rootProjectFile = new ProjectFileImpl(null, "", true, false);
- scanDirectory(
new File(basePath)
, rootProjectFile);
+ scanDirectory(
basePathFile
, rootProjectFile);
return rootProjectFile;
}
return rootProjectFile;
}