After using the following line of code to copy long path:
File.Copy(source, destination, options, true, CopyMoveProgressCallback, null, PathFormat.FullPath);
I got this error:
System.IO.DirectoryNotFoundException
HResult=0x80070003
Message=C:\Users\xxxxxxx xxxxxxxx\Downloads\iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\MetatoggerOffice2016ColorfulSE\.td\Sources\obj.Temp\MetatoggerOffice2016ColorfulSE\DocumentViewer\MetatoggerOffice2016ColorfulSE\DocumentViewerBarItems.xaml
Source=AlphaFS
Arborescence des appels de procédure :
at Alphaleonis.Win32.Filesystem.Directory.ExistsDriveOrFolderOrFile(KernelTransaction transaction, String path, Boolean isFolder, Int32 lastError, Boolean throwIfDriveNotExists, Boolean throwIfFolderOrFileNotExists) in C:\Users\jjangli\Documents\GitHub\AlphaFS\AlphaFS\Filesystem\Directory Class\Directory.ExistsDrive.cs:line 86
As you can see, the copy fails with DirectoryNotFoundException. The issue seems to be related to long path because if I change the destination from C:\Users\xxxxxxx xxxxxxxx\Downloads\iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\MetatoggerOffice2016ColorfulSE\.td\Sources\obj.Temp\MetatoggerOffice2016ColorfulSE\DocumentViewer\MetatoggerOffice2016ColorfulSE\DocumentViewerBarItems.xaml to C:\Users\xxxxxxx xxxxxxxx\Downloads\i\MetatoggerOffice2016ColorfulSE\.td\Sources\obj.Temp\MetatoggerOffice2016ColorfulSE\DocumentViewer\MetatoggerOffice2016ColorfulSE\DocumentViewerBarItems.xaml, the copy works as expected. I expected to be immune to PathTooLong errors with AlphaFS. But maybe I missed something?
As you can also see, the error message that is returned by AlphaFS is particularly abstruse since only the path to the file is returned without specifying the nature of the problem. Without debugger attached, difficult to determine the real underlying problem.
Hi,
I use AlphaFS 2.2.5 (latest NuGet package).
After using the following line of code to copy long path:
File.Copy(source, destination, options, true, CopyMoveProgressCallback, null, PathFormat.FullPath);
I got this error:
As you can see, the copy fails with
DirectoryNotFoundException
. The issue seems to be related to long path because if I change the destination fromC:\Users\xxxxxxx xxxxxxxx\Downloads\iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\MetatoggerOffice2016ColorfulSE\.td\Sources\obj.Temp\MetatoggerOffice2016ColorfulSE\DocumentViewer\MetatoggerOffice2016ColorfulSE\DocumentViewerBarItems.xaml
toC:\Users\xxxxxxx xxxxxxxx\Downloads\i\MetatoggerOffice2016ColorfulSE\.td\Sources\obj.Temp\MetatoggerOffice2016ColorfulSE\DocumentViewer\MetatoggerOffice2016ColorfulSE\DocumentViewerBarItems.xaml
, the copy works as expected. I expected to be immune to PathTooLong errors with AlphaFS. But maybe I missed something?As you can also see, the error message that is returned by AlphaFS is particularly abstruse since only the path to the file is returned without specifying the nature of the problem. Without debugger attached, difficult to determine the real underlying problem.
Thanks you for your help.
Regards,