You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
Hi,
I am having an issue with the latest version of AlphaFS where the result of Directory.Exists is not accurate, or at least not consistent with the result of System.IO.Directory.Exists
In my code I am doing the following
Removing a directory
Check to ensure the directory has been deleted as deleting it is not guaranteed to be synchronous. see here.
Recreating the same directory once Directory.Exists returns false.
Problem: Alphaleonis.Win32.Filesystem.Directory.Exists returns false even though the directory still exists (has been marked for deletion by Windows, but is yet to be deleted)
When attempting to do a Directory.Create I get a System.UnauthorizedAccessException as the folder hasn't been removed.
If I rely on System.IO.Directory.Exists, I don't see this problem as it only returns false when the directory has been completely removed.
This issue is quite tricky to reproduce as you need some sort of handle on the directory you are attempting to delete, such as having it open in Windows Explorer. The handle on the directory doesn't prevent it from being deleted, it just makes it so there is a slight delay between being marked for deletion and the actual deletion.
I do not see this issue in AlphaFS 2.1.3 it only happens in version >= 2.2
I can try and put together a proof of concept for the issue, I just wanted to see if maybe this was already a known issue, or if there is potentially a work around.
The text was updated successfully, but these errors were encountered:
Hi,
I am having an issue with the latest version of AlphaFS where the result of
Directory.Exists
is not accurate, or at least not consistent with the result ofSystem.IO.Directory.Exists
In my code I am doing the following
Problem:
Alphaleonis.Win32.Filesystem.Directory.Exists
returns false even though the directory still exists (has been marked for deletion by Windows, but is yet to be deleted)When attempting to do a Directory.Create I get a
System.UnauthorizedAccessException
as the folder hasn't been removed.If I rely on
System.IO.Directory.Exists
, I don't see this problem as it only returns false when the directory has been completely removed.This issue is quite tricky to reproduce as you need some sort of handle on the directory you are attempting to delete, such as having it open in Windows Explorer. The handle on the directory doesn't prevent it from being deleted, it just makes it so there is a slight delay between being marked for deletion and the actual deletion.
I do not see this issue in AlphaFS 2.1.3 it only happens in version >= 2.2
I can try and put together a proof of concept for the issue, I just wanted to see if maybe this was already a known issue, or if there is potentially a work around.
The text was updated successfully, but these errors were encountered: