mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
r24549: Fix unix_convert to return the already converted part
This API will change anyway when moving away from pstrings. It took so long to fix, because that rename bug I just fixed gave make test failures that had nothing to do with this one. I have samba4 tests for both bugs, will check them in when the build farm has caught up
This commit is contained in:
parent
fddc9db911
commit
d4f442ed9b
@ -173,7 +173,7 @@ NTSTATUS unix_convert(connection_struct *conn,
|
||||
result =determine_path_error(
|
||||
&orig_path[2], allow_wcard_last_component);
|
||||
}
|
||||
goto fail;
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -222,8 +222,8 @@ NTSTATUS unix_convert(connection_struct *conn,
|
||||
|
||||
if ((dirpath == NULL) && (!(dirpath = SMB_STRDUP("")))) {
|
||||
DEBUG(0, ("strdup failed\n"));
|
||||
result = NT_STATUS_NO_MEMORY;
|
||||
goto fail;
|
||||
SAFE_FREE(name);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -602,9 +602,15 @@ NTSTATUS unix_convert(connection_struct *conn,
|
||||
DEBUG(5,("conversion finished %s -> %s\n",orig_path, name));
|
||||
|
||||
done:
|
||||
result = NT_STATUS_OK;
|
||||
pstrcpy(orig_path, name);
|
||||
SAFE_FREE(name);
|
||||
SAFE_FREE(dirpath);
|
||||
return NT_STATUS_OK;
|
||||
fail:
|
||||
DEBUG(10, ("dirpath = [%s] start = [%s]\n", dirpath, start));
|
||||
pstrcpy(orig_path, dirpath);
|
||||
pstrcat(orig_path, "/");
|
||||
pstrcat(orig_path, start);
|
||||
SAFE_FREE(name);
|
||||
SAFE_FREE(dirpath);
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user