diff options
-rw-r--r-- | source3/smbwrapper/smbw_stat.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbwrapper/smbw_stat.c b/source3/smbwrapper/smbw_stat.c index 926075c864..74bf83d0dc 100644 --- a/source3/smbwrapper/smbw_stat.c +++ b/source3/smbwrapper/smbw_stat.c @@ -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; |