want to create an object straight under the root directory of what we
mounted.
As always, the actual object to create is then a string starting after the \0 byte
{
struct nfs_cb_data *data;
{
struct nfs_cb_data *data;
- if (path[0] != '/') {
- rpc_set_error(nfs->rpc, "Pathname is not absulute %s", path);
+ if (path[0] != 0 && path[0] != '/') {
+ rpc_set_error(nfs->rpc, "Pathname is not absolute %s", path);
str = &str[strlen(str) + 1];
str = &str[strlen(str) + 1];
memset(&args, 0, sizeof(CREATE3args));
args.where.dir.data.data_len = data->fh.data.data_len;
args.where.dir.data.data_val = data->fh.data.data_val;
memset(&args, 0, sizeof(CREATE3args));
args.where.dir.data.data_len = data->fh.data.data_len;
args.where.dir.data.data_val = data->fh.data.data_val;
- /* new_path now points to the parent directory, and beyond the nul terminateor is the new directory to create */
+ /* new_path now points to the parent directory, and beyond the nul terminator is the new directory to create */
if (nfs_lookuppath_async(nfs, new_path, cb, private_data, nfs_creat_continue_internal, new_path, free, mode) != 0) {
rpc_set_error(nfs->rpc, "Out of memory: failed to start parsing the path components");
return -1;
if (nfs_lookuppath_async(nfs, new_path, cb, private_data, nfs_creat_continue_internal, new_path, free, mode) != 0) {
rpc_set_error(nfs->rpc, "Out of memory: failed to start parsing the path components");
return -1;