EldoS | Feel safer!

Software components for data protection, secure storage and transfer

OnDeleteFile with sample project

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#6987
Posted: 07/18/2008 01:24:46
by Tobias Fensch (Standard support level)
Joined: 04/04/2008
Posts: 8

hi,

i found a problem using your sample project. When i try to delete an already existing (before the mount process) folder, your CbFsDeleteFile-Function throws an error.

The problem is that the FileInfo->getAttribute() doesn't return FILE_ATTRIBUTE_DIRECTORY. So the DeleteFile()-Function is called and fails.

Can you try to reproduce that?

thanks for help

Tobias
#6991
Posted: 07/18/2008 08:06:23
by Volodymyr Zinin (EldoS Corp.)

Hello,

Thanks. The bug is reproducible. We'll fix it in a short time.
#7066
Posted: 07/26/2008 09:04:29
by Eugene Mayevski (EldoS Corp.)

Build 36 is available on the site. Please download it - it should solve your problem.


Sincerely yours
Eugene Mayevski
#7081
Posted: 07/28/2008 01:38:06
by Tobias Fensch (Standard support level)
Joined: 04/04/2008
Posts: 8

hello,

it doesn't work. It's the same behaviour. If I try to delete an existing directory, the pFileInfo->get_Attributes() returns the wrong attribute.

bye

Tobias
#7085
Posted: 07/28/2008 08:13:05
by Vladimir Cherniga (EldoS Corp.)

Hello,
You said that next code sample from OnDeleteFile doesn't work ?
Code
    if(FileInfo->get_Attributes() & FILE_ATTRIBUTE_DIRECTORY)
    {
        result = RemoveDirectory(FName);
    }
    else
    {
        result = DeleteFile(FName);
    }
#7095
Posted: 07/29/2008 01:12:11
by Tobias Fensch (Standard support level)
Joined: 04/04/2008
Posts: 8

hello,

thats right.

I do the following with yout Mapper sample:
- mount a virtual drive
- create a directory on the virtual drive
- unmount the virtual drive
- mount the same virtual drive again
- try to delete the created directory -> exception

the problem is that the

Code
    if(FileInfo->get_Attributes() & FILE_ATTRIBUTE_DIRECTORY)


doesn't return the FILE_ATTRIBUTE_DIRECTORY flag for the directory that I want to delete.

bye

Tobias
#7096
Posted: 07/29/2008 01:23:53
by Vladimir Cherniga (EldoS Corp.)

Check please if the newly updated cbfs.lib library file are linked to your sample project ?
#7100
Posted: 07/29/2008 03:52:11
by Tobias Fensch (Standard support level)
Joined: 04/04/2008
Posts: 8

ok, sorry...

now it works. good job and thx.

bye
Tobias
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

Topic viewed 4534 times

Number of guests: 2, 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!