Fix for no master browser present.
authorTim Potter <tpot@samba.org>
Tue, 16 Jan 2001 17:48:39 +0000 (17:48 +0000)
committerTim Potter <tpot@samba.org>
Tue, 16 Jan 2001 17:48:39 +0000 (17:48 +0000)
(This used to be commit 24c78fdf5fb940b32724474241c464206b83be2f)

source3/smbwrapper/smbw_stat.c

index 926075c864f82bd48c2a2ae1f007f9b3ccbc9472..74bf83d0dc80802f968eca457d001f6fde85da67 100644 (file)
@@ -202,10 +202,11 @@ int smbw_stat(const char *fname, struct stat *st)
        srv = smbw_server(server, share);
        if (!srv) {
 
-               /* For shares we aren't allowed to connect to, return
-                  an empty directory */
+               /* For shares we aren't allowed to connect to, or no master
+                  browser found, return an empty directory */
 
-               if (server[0] && share[0] && !path[0] && errno == EACCES) {
+               if ((server[0] && share[0] && !path[0] && errno == EACCES) ||
+                   (!path[0] && errno == ENOENT)) {
                        mode = aDIR | aRONLY;
                        smbw_setup_stat(st, path, size, mode);
                        goto done;