fengye110 / dokan

Automatically exported from code.google.com/p/dokan
0 stars 0 forks source link

Move File issue #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. execute move/rename command on command prompt to move or rename the file
2.
3.

What is the expected output? What do you see instead?
rename of file or movement of file from one location to another

What version of the product are you using? On what operating system?
dokan 0.2.0 and windows server 2008. 

Please provide any additional information below.
whenever i execute move or rename command on command prompt (move/rename 
first.txt second.txt), first call goes to dokan createfile function and 
not to move file function. Create file tries to open second file 
(second.txt) and it doesnot get it and create file function throws an 
error saying file(second.txt) not found. why this is so?

Original issue reported on code.google.com by anandji...@gmail.com on 20 Oct 2008 at 3:58

GoogleCodeExporter commented 9 years ago
Hello,
I think this is expected behavior. move command checks whether the target file 
exists 
and when it doesn't exist, it changes the file name.
Every file operation invokes CreateFile(or CreateDirectory,OpenDirectory).
Please read dokan readme file for more information.
http://dokan-dev.net/en/docs/dokan-readme/

Original comment by asa...@gmail.com on 20 Oct 2008 at 4:09

GoogleCodeExporter commented 9 years ago
I agree that move/rename command should call createfile function. But in 
createfile 
function filemode of first file as well as second file is open. As Second file 
is 
not present and its in open mode so create file function can not create it or 
open 
it. At the end move/rename file command doesnot work. I tried creating file in 
createfile function even if it is in open mode but semantically it's incorrect. 
can 
you please tell me what is workaround for move/rename file?

Original comment by anandji...@gmail.com on 21 Oct 2008 at 11:25

GoogleCodeExporter commented 9 years ago
When the second file is opened, CreateFile should fail and return -
ERROR_FILE_NOT_FOUND (file) or -ERROR_PATH_NOT_FOUND (directory). You can 
figure out 
by checking how Dokan mirror works.

Original comment by asa...@gmail.com on 21 Oct 2008 at 1:45