EldoS | Feel safer!

Software components for data protection, secure storage and transfer

OnRenameOrMove Callback should support ReplaceIfExists

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#12056
Posted: 01/06/2010 00:57:45
by Mezeo Support (Basic support level)
Joined: 12/29/2009
Posts: 40

If we look for FILE_RENAME_INFORMATION in DDK docs there is following member
BOOLEAN ReplaceIfExists;
Set to TRUE to specify that if a file with the given name already exists, it should be replaced with the given file. Set to FALSE if the rename operation should fail if a file with the given name already exists.

OnRenameOrMove Callback doesnt have any such argument to process above rename operation.

Below is IFS test output which is failing due to same reason

ConflictingRenameInformationTestTest :ConflictingRenameInformationTest
Group :FileInformation
Status :C000001E (IFSTEST_TEST_NTAPI_FAILURE_CODE)
LastNtStatus :C0000035 STATUS_OBJECT_NAME_COLLISION
ExpectedNtStatus :00000000 STATUS_SUCCESS
TestVariant :00010001 TEST_VARIANT_FILE
Description :{Msg# FileInfo!crename!13} An attempt was made to
set the name information on the file \crename.dat on
\??\M:\My Files\fileinfo. This attempt tries to
rename the file to an existing one. This should have
returned a success because the Replace If Exists flag
is set. Check the last status that was returned.
Lookup Query : http://www.microsoft.com/ContentRedirect.asp?prd=IFSKit&id=FileIn
fo!crename!13&pver=2195
#12057
Posted: 01/06/2010 02:18:26
by Volodymyr Zinin (EldoS Corp.)

CallbackFS handles the ReplaceIfExists flag itself in order to simplify the user callbacks.
The problem can be in the OnRenameOrMove callback implementation. Perhaps it returns an error.
#12058
Posted: 01/06/2010 03:13:05
by Mezeo Support (Basic support level)
Joined: 12/29/2009
Posts: 40

Thanks Vladimir.

You are right. Our code was not supporting this kind of rename.

Have you tried running IFS test ever on the callback file system ? Is your callback file system IFS complainant ?
#12060
Posted: 01/06/2010 03:53:30
by Volodymyr Zinin (EldoS Corp.)

We are going to do it in the nearest time. And of course will make any corrections if it's necessary.

Reply

Statistics

Topic viewed 1527 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!