VeriorPies/ParrelSync

[BUG] FileNotFoundException - path may be too long? (265 characters)

CodeSmile-0000011110110111 opened this issue · 2 comments

I get a FileNotFoundException when trying to create a clone, after which Unity keeps showing the "Hold on" progress dialog forever, even though the editor itself remains responsive. The cloned folder remains empty.

The file in question is at this path, it is 265 chars in total:

C:\Users\Eedee F\UnityProjects\_Netcode\CodeSmile for Netcode 2020.3\Library\PackageCache\com.unity.collections@1.2.4\Unity.Collections.LowLevel.ILSupport\source~\Unity.Collections.LowLevel.ILSupport.CodeGen\Unity.Collections.LowLevel.ILSupport.CodeGen.asmdef.meta

Relevant part of stacktrace:

FileNotFoundException: Could not find file 'C:\Users\Eedee F\UnityProjects\_Netcode\CodeSmile for Netcode 2020.3\Library\PackageCache\com.unity.collections@1.2.4\Unity.Collections.LowLevel.ILSupport\source~\Unity.Collections.LowLevel.ILSupport.CodeGen\Unity.Collections.LowLevel.ILSupport.CodeGen.asmdef.meta'.
System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.FileInfo.get_Length () (at <695d1cc93cca45069c528c15c9fdd749>:0)
(wrapper remoting-invoke-with-check) System.IO.FileInfo.get_Length()
ParrelSync.ClonesManager+<>c.<GetDirectorySize>b__28_0 (System.IO.FileInfo file) (at Library/PackageCache/com.veriorpies.parrelsync@f454248221/Editor/ClonesManager.cs:599)

Enviroment (please complete the following information):

  • Unity Editor Version: 2020.3.40 (Collections 1.2.4)
  • ParrelSync Version: 1.5.0
  • OS Version: Win 10

Note:
This may be related to the other FileNotFound exception issue but I decided to make a new one because I couldn't tell for sure whether it is the same issue. See: #86

I shortened the project folder to 'CSN20.3' - now I can successfully clone.

Did a little digging, here's some info on how you might potentially enable long paths support:
https://stackoverflow.com/questions/5188527/how-to-deal-with-files-with-a-name-longer-than-259-characters

Hopefully that is possible without too much work. ;)

Yes, this is a known issue for windows.
(Please refer to the F&Q and Trouble shooting page)