alphaleonis / AlphaFS

AlphaFS is a .NET library providing more complete Win32 file system functionality to the .NET platform than the standard System.IO classes.
http://alphafs.alphaleonis.com/
MIT License
562 stars 99 forks source link

DirectoryNotFoundException with MoveOptions.DelayUntilReboot #484

Closed ghost closed 6 years ago

ghost commented 6 years ago

If I call File.Move(source, null, MoveOptions.DelayUntilReboot) I receive a DirectoryNotFoundExecption with the following stack

System.IO.DirectoryNotFoundException: (3) The system cannot find the path specified.
   at Alphaleonis.Win32.NativeError.ThrowException(UInt32 errorCode, String readPath, String writePath) in C:\Users\jjangli\Documents\GitHub\AlphaFS\AlphaFS\NativeError.cs:line 115
   at Alphaleonis.Win32.NativeError.ThrowException(Int32 errorCode, Nullable`1 isFolder, String readPath) in C:\Users\jjangli\Documents\GitHub\AlphaFS\AlphaFS\NativeError.cs:line 58
   at Alphaleonis.Win32.Filesystem.NativeMethods.CloseHandleAndPossiblyThrowException(SafeHandle handle, Int32 lastError, Nullable`1 isFolder, String path, Boolean throwException) in C:\Users\jjangli\Documents\GitHub\AlphaFS\AlphaFS\Filesystem\Native Methods\NativeMethods.Utilities.cs:line 154
   at Alphaleonis.Win32.Filesystem.File.CreateFileCore(KernelTransaction transaction, Nullable`1 isFolder, String path, ExtendedFileAttributes attributes, FileSecurity fileSecurity, FileMode fileMode, FileSystemRights fileSystemRights, FileShare fileShare, Boolean checkPath, Boolean continueOnException, PathFormat pathFormat) in C:\Users\jjangli\Documents\GitHub\AlphaFS\AlphaFS\Filesystem\File Class\File.Create.cs:line 352
   at Alphaleonis.Win32.Filesystem.File.GetSizeCore(KernelTransaction transaction, SafeFileHandle safeHandle, String path, PathFormat pathFormat) in C:\Users\jjangli\Documents\GitHub\AlphaFS\AlphaFS\Filesystem\File Class\File.GetSize.cs:line 107
   at Alphaleonis.Win32.Filesystem.File.CopyMoveCore(KernelTransaction transaction, Boolean driveChecked, Boolean isFolder, String sourcePath, String destinationPath, Nullable`1 copyOptions, Nullable`1 moveOptions, Boolean preserveDates, CopyMoveProgressRoutine progressHandler, Object userProgressData, CopyMoveResult copyMoveResult, PathFormat pathFormat) in C:\Users\jjangli\Documents\GitHub\AlphaFS\AlphaFS\Filesystem\File Class\File.Copy.cs:line 815
   at Alphaleonis.Win32.Filesystem.File.Move(String sourcePath, String destinationPath, MoveOptions moveOptions) in C:\Users\jjangli\Documents\GitHub\AlphaFS\AlphaFS\Filesystem\File Class\File.Move.cs:line 162