Post

Replies

Boosts

Views

Activity

stdlib rename api opening new handle when trying to write over network to mounted location
I have a folder present in windows , which i am mounting from mac side using smb. Into this mounted location i'm trying to write a new file over the network. After writing the data into the file , the handle is closed. Now i need to rename the file over network from mac side . So for that, making use of stdlib rename(), observed that the file rename is working fine but renaming of the file is opening a new handle which cannot be captured. When i try to delete the same file ( which is now in a windows folder) over network using DeleteFile api ,the file gets marked for delete , but actually fails to delete and the permission of the files gets changed as the the file is still open( came to know from computer management open files). Tried to print the open handles in mac side using pid but newly open file was not listed. tried using process monitor to capture the events but it was not listing any open handle or telling the process holding it. also tried using process explorer and handler.exe
2
0
458
Jul ’20
rename over network open new handle when done from mac to windows
Hi, I have a folder present in windows , which i am mounting from mac side using smb. Into this mounted location i'm trying to write a new file over the network. After writing the data into the file , the handle is closed. Now i need to rename the file over network from mac side . So for that, making use of stdlib rename(), observed that the file rename is working fine, but renaming of the file is opening a new handle which cannot be captured. When i try to delete the same file over network using DeleteFile api ,the file gets marked for delete , but actually fails to delete and the permission of the files gets changed as the the file is still open(which i came to know from computer management open files). So stdlib rename api is opening the new handle while renaming which prevents the file from delete. stuck with this issue and Need inputs to fix it. Using XCode version 7.3.1
3
0
422
Jul ’20