GetFileAttributes for deleted file return unexpected result
MustafaDaoud90 opened this issue · comments
After deleted file when using ZetaLongPaths.ZlpIOHelper.GetFileAttributes(_Path) to get the file attribute and check if hidden or not always Zeta library return Hidden = true this is wrong case because the file does not exist it must return exception like System.IO.File.GetAttributes(_Path).
Example:
bool isHidden = ((ZetaLongPaths.ZlpIOHelper.GetFileAttributes(txtPath.Text) & ZetaLongPaths.Native.FileAttributes.Hidden) == ZetaLongPaths.Native.FileAttributes.Hidden); >>>>>>> always return True for not exist file.
bool isHidden = ((System.IO.File.GetAttributes(txtPath.Text) & System.IO.FileAttributes.Hidden) == System.IO.FileAttributes.Hidden); >>>>>>> return exception.
I need help to make ZetaLongPaths.ZlpIOHelper.GetFileAttributes return the same result of System.IO.File.GetAttributes.
I've just uploaded a new version (1.0.0.40) here and to NuGet that should fix this.
Thank you a lot, it's worked, and the bug solved.