EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Deleting Virtual Files/Folders

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#32713
Posted: 03/23/2015 10:28:37
by Stelios Mavridis (Basic support level)
Joined: 01/09/2015
Posts: 34

Hello,

In my application i use virtual files and folders.
At exit time i must delete all virtual files/folder i have created.

I use the following code(C#) for removing directories:
Code
foreach (string dir in Directory.GetDirectories(file_path))
{
  Directory.Delete(dir, true);
}


The issue i am having is that even though the foreach loop provides me with a directory name(c:\docshare\test) the Delete function throws an IOException with the message "The directory name is invalid.";

Here is a log from the run(using proccess monitor):
Quote

"Operation","Path","Result","Detail"
"CreateFile","C:\DocShare","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, ShareMode: Read, Write, Delete, OpenResult: Opened"
"QueryNetworkOpenInformationFile","C:\DocShare","SUCCESS","..., AllocationSize: 4096, EndOfFile: 4096, FileAttributes: D"
"CloseFile","C:\DocShare","SUCCESS",""
"CreateFile","C:\DocShare","SUCCESS","Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened"
"QueryDirectory","C:\DocShare\*","SUCCESS","Filter: *, 1: ."
"QueryDirectory","C:\DocShare","SUCCESS","0: .., 1: test" <- Enumerate returns the folder 'test'
"QueryDirectory","C:\DocShare","NO MORE FILES",""
"CloseFile","C:\DocShare","SUCCESS",""


I am not sure of what is happening here, do you have any clues or suggestions on what is happening?
#32717
Posted: 03/23/2015 13:15:09
by Vladimir Cherniga (Team)

Hello,
Do you able to cach an exception and find the path that was detected as invalid (dir- value in your case) ? Thank you.
#32719
Posted: 03/23/2015 13:27:48
by Stelios Mavridis (Basic support level)
Joined: 01/09/2015
Posts: 34

Quote
Vladimir Cherniga wrote:
Hello,
Do you able to cach an exception and find the path that was detected as invalid (dir- value in your case) ? Thank you.


Yes the path is c:\docshare\test which is what i expected and i also get this from the foreach loop.
#32925
Posted: 04/02/2015 17:39:34
by RBRO Development  (Standard support level)
Joined: 04/02/2015
Posts: 2

Hello,

I am having the same problem as described above. The path does exist and still getting an exception.

In addition I am checking whether the Directory exists before attempting to delete it using Directory.Exists.
The Directory.Exists function returns True for folders that Directory.Delete throws an IO Exception.

If I can clarify in any way let me know, we need to find a solution or workaround for this ASAP

Thank you in advance
#32929
Posted: 04/03/2015 02:16:25
by Vladimir Cherniga (Team)

Thank you for the report about the problem. I've moved the question to helpdesk system for further investigation.
#32954
Posted: 04/05/2015 22:26:16
by RBRO Development  (Standard support level)
Joined: 04/02/2015
Posts: 2

Can I please get a ticket # or a link to follow the issue? This is very high priority for us right now.
#32956
Posted: 04/05/2015 23:52:21
by Eugene Mayevski (Team)

You are welcome to visit HelpDesk and you'll see only your support tickets there.

Please note that your e-mail server bounces all e-mail and this is why you don't receive notifications from the HelpDesk and from this forum as well.


Sincerely yours
Eugene Mayevski
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 5398 times

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




|

Back to top

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

Got it!