s4-streams: fixed handling of stream rename and overwrite
[ira/wip.git] / source4 / ntvfs / posix / pvfs_rename.c
index 7f8eab5aa0b6e3c36a323a8025e348149a65e89c..d963357cbabd2ad4d0cd18537d6ae153c2746689 100644 (file)
@@ -118,13 +118,13 @@ static const char *pvfs_resolve_wildcard_component(TALLOC_CTX *mem_ctx,
                c1 = next_codepoint_convenience(iconv_convenience, p1, &c_size1);
                c2 = next_codepoint_convenience(iconv_convenience, p2, &c_size2);
                if (c2 == '?') {
-                       d += push_codepoint(iconv_convenience, d, c1);
+                       d += push_codepoint_convenience(iconv_convenience, d, c1);
                } else if (c2 == '*') {
                        memcpy(d, p1, strlen(p1));
                        d += strlen(p1);
                        break;
                } else {
-                       d += push_codepoint(iconv_convenience, d, c2);
+                       d += push_codepoint_convenience(iconv_convenience, d, c2);
                }
 
                p1 += c_size1;
@@ -515,7 +515,8 @@ static NTSTATUS pvfs_rename_stream(struct ntvfs_module_context *ntvfs,
        NT_STATUS_NOT_OK_RETURN(status);
 
        status = pvfs_stream_rename(pvfs, name1, -1, 
-                                   ren->ntrename.in.new_name+1);
+                                   ren->ntrename.in.new_name+1, 
+                                   true);
        NT_STATUS_NOT_OK_RETURN(status);
        
        return NT_STATUS_OK;