fsp_fullbasepath(fsp, fullpath, sizeof(fullpath));
- /*
- * Avoid /. at the end of the path name. notify can't
- * deal with it.
- */
- if (len > 1 && fullpath[len-1] == '.' &&
- fullpath[len-2] == '/') {
- fullpath[len-2] = '\0';
- }
-
notify_remove(fsp->conn->sconn->notify_ctx, fsp, fullpath);
TALLOC_FREE(fsp->notify);
}
SMB_ASSERT(buflen == 0);
}
- len = snprintf(buf, buflen, "%s/%s", fsp->conn->connectpath,
- fsp->fsp_name->base_name);
- SMB_ASSERT(len>0);
+ if (ISDOT(fsp->fsp_name->base_name)) {
+ len = snprintf(buf, buflen, "%s", fsp->conn->connectpath);
+ } else {
+ len = snprintf(buf,
+ buflen,
+ "%s/%s",
+ fsp->conn->connectpath,
+ fsp->fsp_name->base_name);
+ }
+ SMB_ASSERT(len > 0);
return len;
}
fsp_fullbasepath(fsp, fullpath, sizeof(fullpath));
- /*
- * Avoid /. at the end of the path name. notify can't deal with it.
- */
- if (len > 1 && fullpath[len-1] == '.' && fullpath[len-2] == '/') {
- fullpath[len-2] = '\0';
- }
-
if ((fsp->notify->filter != 0) ||
(fsp->notify->subdir_filter != 0)) {
status = notify_add(fsp->conn->sconn->notify_ctx,
NTSTATUS status;
fsp_fullbasepath(fsp, fullpath, sizeof(fullpath));
- if (len > 1 && fullpath[len-1] == '.' &&
- fullpath[len-2] == '/') {
- fullpath[len-2] = '\0';
- }
status = notify_add(fsp->conn->sconn->notify_ctx,
fullpath, fsp->notify->filter,