|
|
Created:
10 years ago by Brett Modified:
10 years ago CC:
connector-cr_google.com Visibility:
Public. |
DescriptionFix 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.
Patch Set 1 #Patch Set 2 : PJ's feedback #
Total comments: 1
MessagesTotal messages: 9
Are non-directory regular-files really allowed as start paths? - technology's compounding interest - On Thu, Apr 10, 2014 at 4:39 PM, <Brett.Michael.Johnson@gmail.com> wrote: > Reviewers: pjo, mifern, > > Description: > 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. > > > > Please review this at http://codereview.appspot.com/86630044/ > > Affected files (+2, -1 lines): > M src/com/google/enterprise/adaptor/fs/FsAdaptor.java > > > Index: src/com/google/enterprise/adaptor/fs/FsAdaptor.java > diff --git a/src/com/google/enterprise/adaptor/fs/FsAdaptor.java > b/src/com/google/enterprise/adaptor/fs/FsAdaptor.java > index d4c30999e3b34fa1649ed5cd27b34952c9706a55.. > ee934e09c11a0457da6730f85e4bd6bc444d8885 100644 > --- a/src/com/google/enterprise/adaptor/fs/FsAdaptor.java > +++ b/src/com/google/enterprise/adaptor/fs/FsAdaptor.java > @@ -232,7 +232,8 @@ public class FsAdaptor extends AbstractAdaptor > implements > } > if (!isSupportedPath(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 shared, or it is not a > " > + + "file or directory."); > } > > builtinPrefix = context.getConfig().getValue(CONFIG_BUILTIN_PREFIX); > > >
Sign in to reply to this message.
On Apr 10, 2014, at 4:44 PM, PJ <pjo@google.com> wrote: > Are non-directory regular-files really allowed as start paths? > TIL Windows does not allow you to share a regular file. However a regular file as a start path in the local file system should work. That would be the extreme minority case tho. > > - technology's compounding interest > - > > > On Thu, Apr 10, 2014 at 4:39 PM, <Brett.Michael.Johnson@gmail.com> wrote: > Reviewers: pjo, mifern, > > Description: > 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. > > > > Please review this at http://codereview.appspot.com/86630044/ > > Affected files (+2, -1 lines): > M src/com/google/enterprise/adaptor/fs/FsAdaptor.java > > > Index: src/com/google/enterprise/adaptor/fs/FsAdaptor.java > diff --git a/src/com/google/enterprise/adaptor/fs/FsAdaptor.java b/src/com/google/enterprise/adaptor/fs/FsAdaptor.java > index d4c30999e3b34fa1649ed5cd27b34952c9706a55..ee934e09c11a0457da6730f85e4bd6bc444d8885 100644 > --- a/src/com/google/enterprise/adaptor/fs/FsAdaptor.java > +++ b/src/com/google/enterprise/adaptor/fs/FsAdaptor.java > @@ -232,7 +232,8 @@ public class FsAdaptor extends AbstractAdaptor implements > } > if (!isSupportedPath(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 shared, or it is not a " > + + "file or directory."); > } > > builtinPrefix = context.getConfig().getValue(CONFIG_BUILTIN_PREFIX); > > >
Sign in to reply to this message.
PJ's feedback
Sign in to reply to this message.
https://codereview.appspot.com/86630044/diff/20001/src/com/google/enterprise/... File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/86630044/diff/20001/src/com/google/enterprise/... src/com/google/enterprise/adaptor/fs/FsAdaptor.java:236: + "shared."); So if the objective is to address "folder on a server is not shared give a better error message" then the adaptor should really check that if the path is a UNC path. In which case, it could give a error message saying that the UNC path is not a shared path.
Sign in to reply to this message.
On 2014/04/11 18:13:19, mifern wrote: > https://codereview.appspot.com/86630044/diff/20001/src/com/google/enterprise/... > File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): > > https://codereview.appspot.com/86630044/diff/20001/src/com/google/enterprise/... > src/com/google/enterprise/adaptor/fs/FsAdaptor.java:236: + "shared."); > So if the objective is to address "folder on a server is not shared give a > better error message" then the adaptor should really check that if the path is a > UNC path. In which case, it could give a error message saying that the UNC path > is not a shared path. Do we expect to handle local or mounted filesystems in the future? I deliberately left the phrasing as is for that case.
Sign in to reply to this message.
Would you be interested to add support for mapped drives and local drives this quarter? That would be a swell OKR. Thank you, PJ - technology's compounding interest - On Fri, Apr 11, 2014 at 11:16 AM, <Brett.Michael.Johnson@gmail.com> wrote: > On 2014/04/11 18:13:19, mifern wrote: > > https://codereview.appspot.com/86630044/diff/20001/src/ > com/google/enterprise/adaptor/fs/FsAdaptor.java > >> File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): >> > > > https://codereview.appspot.com/86630044/diff/20001/src/ > com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode236 > >> src/com/google/enterprise/adaptor/fs/FsAdaptor.java:236: + "shared."); >> So if the objective is to address "folder on a server is not shared >> > give a > >> better error message" then the adaptor should really check that if the >> > path is a > >> UNC path. In which case, it could give a error message saying that the >> > UNC path > >> is not a shared path. >> > > Do we expect to handle local or mounted filesystems in the future? > I deliberately left the phrasing as is for that case. > > https://codereview.appspot.com/86630044/ >
Sign in to reply to this message.
Got it. Thanks. LGTM. - technology's compounding interest - On Fri, Apr 11, 2014 at 10:30 AM, Brett Johnson < brett.michael.johnson@gmail.com> wrote: > On Apr 10, 2014, at 4:44 PM, PJ <pjo@google.com> wrote: > > Are non-directory regular-files really allowed as start paths? > > > TIL Windows does not allow you to share a regular file. > However a regular file as a start path in the local file > system should work. That would be the extreme minority > case tho. > > > > - technology's compounding interest > - > > > On Thu, Apr 10, 2014 at 4:39 PM, <Brett.Michael.Johnson@gmail.com> wrote: > >> Reviewers: pjo, mifern, >> >> Description: >> 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. >> >> >> >> Please review this at http://codereview.appspot.com/86630044/ >> >> Affected files (+2, -1 lines): >> M src/com/google/enterprise/adaptor/fs/FsAdaptor.java >> >> >> Index: src/com/google/enterprise/adaptor/fs/FsAdaptor.java >> diff --git a/src/com/google/enterprise/adaptor/fs/FsAdaptor.java >> b/src/com/google/enterprise/adaptor/fs/FsAdaptor.java >> index d4c30999e3b34fa1649ed5cd27b34952c9706a55.. >> ee934e09c11a0457da6730f85e4bd6bc444d8885 100644 >> --- a/src/com/google/enterprise/adaptor/fs/FsAdaptor.java >> +++ b/src/com/google/enterprise/adaptor/fs/FsAdaptor.java >> @@ -232,7 +232,8 @@ public class FsAdaptor extends AbstractAdaptor >> implements >> } >> if (!isSupportedPath(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 shared, or it is not >> a " >> + + "file or directory."); >> } >> >> builtinPrefix = context.getConfig().getValue(CONFIG_BUILTIN_PREFIX); >> >> >> > >
Sign in to reply to this message.
Committed 18 April 2014 to File System Adaptor: To https://code.google.com/p/plexi.fs/ 9677f2d..503f76a master -> master
Sign in to reply to this message.
|