Handle unlinking in-use files on virtual drives
* path.cc (path_conv::set_nt_native_path): New function. * path.h (path_conv::set_nt_native_path): Add prototype. * syscall.cc (try_to_bin): Handle moving files to the recycler accessed via a local virtual drive (subst). Fix a problem renaming the file to the unique replacement name on Samba. Align comment. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@ -486,6 +486,18 @@ get_nt_native_path (const char *path, UNICODE_STRING& upath, bool dos)
|
||||
return &upath;
|
||||
}
|
||||
|
||||
/* Handle with extrem care! Only used in a certain instance in try_to_bin.
|
||||
Every other usage needs a careful check. */
|
||||
void
|
||||
path_conv::set_nt_native_path (PUNICODE_STRING new_path)
|
||||
{
|
||||
wide_path = (PWCHAR) crealloc_abort (wide_path, new_path->MaximumLength);
|
||||
memcpy (wide_path, new_path->Buffer, new_path->Length);
|
||||
uni_path.Length = new_path->Length;
|
||||
uni_path.MaximumLength = new_path->MaximumLength;
|
||||
uni_path.Buffer = wide_path;
|
||||
}
|
||||
|
||||
PUNICODE_STRING
|
||||
path_conv::get_nt_native_path ()
|
||||
{
|
||||
|
Reference in New Issue
Block a user