Facepunch / sbox-issues

175 stars 12 forks source link

Asset Browser - Moving FIles - recusive folder creation #6102

Open neanderthalbrainman opened 2 months ago

neanderthalbrainman commented 2 months ago

Describe the bug

When drag and dropping to move a folder, a recursive loop can occur which will continually copy the files into continually deeper levels.

This folder contained a bunch of .cs files which interacts with GameObjects.

image

Reference A: image

To Reproduce

  1. Have at least 2 folders called 'code' and Assets in the root project folder. See ref A
  2. Drag and drop 'code' to 'Assets'
  3. Watch the program time out. The longer you leave it the more folders you get!

Expected behavior

The 'code' folder and the csproj files associated should be copied into the "Assets" folder, rather than creating a new folder called 'code' in the current directory and placing the project files there.

Media/Files

No response

Additional context

The log files for the editor at the time of issue as follows:

2024/08/03 10:07:39.7215    [GameMenu] -98.47415    
2024/08/03 10:07:39.7431    [GameMenu] -98.47415    
2024/08/03 10:07:58.3669    [CompileGroup/local] Building 2 compilers   
2024/08/03 10:09:48.6482    [engine/ResourceSystem] Error loading resource file "materials/hotspots/metal_painted_red_a_hs.vmat_c" (Error: ERROR_FILEOPEN: File not found)  
2024/08/03 10:14:02.8874    [GameMenu] [GameMenu] Detected Asset File Changed /prefabs/sosig_alpha.prefab_c (-1486245431 vs -114161349) 
2024/08/03 10:14:03.0091    [GameMenu] [GameMenu] Detected Asset File Changed /prefabs/sosig_alpha.prefab_c (-114161349 vs -1486245431) 
2024/08/03 10:15:17.0410    [CompileGroup/local] Building 2 compilers   
2024/08/03 10:17:15.2882    [engine/ToolsStallMonitor] Stall detected.  
2024/08/03 10:17:44.5071    [Generic] File [Error] - System.IO.InternalBufferOverflowException: Too many changes at once in directory:C:\users\c\documents\s&box projects\im_not_garry\Code.    
2024/08/03 10:17:44.5356    [Generic] File [Error] - System.IO.InternalBufferOverflowException: Too many changes at once in directory:C:\users\c\documents\s&box projects\im_not_garry\Code.    
2024/08/03 10:17:44.5575    [Generic] File [Error] - System.IO.InternalBufferOverflowException: Too many changes at 

... continued till force closed

Windows 11, Build ID 15247250

neanderthalbrainman commented 2 months ago

Also in case it matters my original folder was 'code' not 'Code'

agincel commented 2 months ago

Just had this happen to me when accidentally misclicking (mis-dragging) a folder. Trying desperately to rescue the stuff buried so deep that windows explorer won't let me access it.

agincel commented 2 months ago

To anyone else wanting to rescue their files out of the infinitely nested subfolder I used Powershell with the following commands:

Get-ChildItem -Path ./ -Recurse -File | Move-Item -Destination ./ (while Powershell was opened to the folder that got infinitely recursed, which in my case was /Assets/prefabs/levels/ (/levels/levels/levels...)

Then to delete all the infinitely nested folders I did: Remove-Item ./levels/ -Recurse -Force, again from inside the top /levels/ folder, to delete all the recursing dupes.

neanderthalbrainman commented 2 months ago

I should have posted that too, this is almost exactly how I resolved it for myself. Thank you!

ShadowBrian commented 2 months ago

This has been fixed, I posted a duplicate of this one in the council chat, sorry! https://github.com/Facepunch/sbox-issues/issues/6258