Fix b/13673493: Better warning message if start path is not shared.
Currently, if a folder on a server is not shared, the adaptor generates
the warning:
"The path ... is not a valid path. The path does not exist or it is not
a file or directory."
If a folder on a server is not shared, the adaptor has no idea if it
exists or not. This change simply changes the error message slightly:
"The path ... is not a valid path. The path does not exist, or it is
not shared, or it is not a file or directory."
This phrasing leaves open the possibility of supporting local file
systems.
Code Review: http://codereview.appspot.com/86630044
diff --git a/src/com/google/enterprise/adaptor/fs/FsAdaptor.java b/src/com/google/enterprise/adaptor/fs/FsAdaptor.java
index 7d528bf..fc3fd4d 100644
--- a/src/com/google/enterprise/adaptor/fs/FsAdaptor.java
+++ b/src/com/google/enterprise/adaptor/fs/FsAdaptor.java
@@ -230,9 +230,10 @@
"DFS link path of the form \\\\host\\ns\\link.");
}
}
- if (!isSupportedPath(rootPath)) {
+ if (!delegate.isDirectory(rootPath)) {
throw new IOException("The path " + rootPath + " is not a valid path. "
- + "The path does not exist or it is not a file or directory.");
+ + "The path does not exist, or it is not a directory, or it is not "
+ + "shared.");
}
builtinPrefix = context.getConfig().getValue(CONFIG_BUILTIN_PREFIX);