Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The filename, directory name, or volume label syntax is incorrect. #1334

Closed
mayagibuyuk opened this issue May 7, 2024 · 11 comments · Fixed by #1345
Closed

[Bug]: The filename, directory name, or volume label syntax is incorrect. #1334

mayagibuyuk opened this issue May 7, 2024 · 11 comments · Fixed by #1345
Labels
bug Something isn't working

Comments

@mayagibuyuk
Copy link

mayagibuyuk commented May 7, 2024

Are you on the latest version of AssetRipper?

Yes, I'm on the latest release of AssetRipper.

Which release are you using?

Windows x64

Which game did this occur on?

https://steamdb.info/app/2008510/

Which Unity version did this occur on?

2021.3.25f1

Is the game Mono or IL2Cpp?

Unknown

Describe the issue.

I got this error when trying to export .bundle file :

[Error] : System.IO.IOException: The filename, directory name, or volume label syntax is incorrect. : 'C:\Users\dnguyenhuu\Downloads\gmb\ExportedProject\Assets\Texture2D\z__Gradient_ColorTex{_mode__0,_colorKeys__[{_color__{_r__0.6037735939025879,_g__0.6037735939025879,_b__0.6037735939025879,_a__1.0},_time__0.0},{_color__{_r__0.8301886916160584,_g__0.8301886916160584,_b__0.8301886916160584,_a__1.0},_time__0.440_100.png.meta'

Relevant log output

AssetRipper.log

@mayagibuyuk mayagibuyuk added the bug Something isn't working label May 7, 2024
Copy link

github-actions bot commented May 7, 2024

Thank you for submitting your first issue here. Please be sure you have uploaded your AssetRipper.log file. It is in the same folder as the exe file. :)

@ds5678
Copy link
Collaborator

ds5678 commented May 7, 2024

It seems like I'm missing a call to FileUtils.RemoveInvalidCharacters.

@ds5678
Copy link
Collaborator

ds5678 commented May 7, 2024

It seems like I'm missing a call to FileUtils.RemoveInvalidCharacters.

Actually, I think this part is fine.

@ds5678
Copy link
Collaborator

ds5678 commented May 7, 2024

https://learn.microsoft.com/en-us/windows/win32/msi/filename

I think the problem is the commas and square brackets.

@ds5678
Copy link
Collaborator

ds5678 commented May 7, 2024

For extra safety, I think we should also exclude ascii control characters in the regex.

@mayagibuyuk
Copy link
Author

mayagibuyuk commented May 28, 2024

This bug still happen in the newest version(1.0.15.0), I checked it on both window x64 and mac armx64. Its look like all other file with the similar file name were export successfully but the file with this name cause issue: z__Gradient_ColorTex{"mode"0"colorKeys"__{"color"{"r"0.6037735939025879"g"0.6037735939025879"b"0.6037735939025879"a"1.0}"time"0.0}{"color"{"r"0.8301886916160584"g"0.8301886916160584"b"0.8301886916160584"a"1.0}"time"_0.440_100.png.meta
image
AssetRipper.log

@ds5678
Copy link
Collaborator

ds5678 commented May 30, 2024

This bug still happen in the newest version(1.0.15.0)

It doesn't.

[Error] : System.IO.PathTooLongException: The path '/Users/meenoi/Downloads/pls/ExportedProject/Assets/Texture2D/z__Gradient_ColorTex{"mode"_0_"colorKeys"__{"color"_{"r"_0.6037735939025879_"g"_0.6037735939025879_"b"_0.6037735939025879_"a"_1.0}_"time"_0.0}_{"color"_{"r"_0.8301886916160584_"g"_0.8301886916160584_"b"_0.8301886916160584_"a"_1.0}_"time"_0.440_100.png.meta' is too long, or a component of the specified path is too long.
   at Interop.ThrowExceptionForIoErrno(Interop.ErrorInfo, String, Boolean) + 0x1c
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String, Interop.Sys.OpenFlags, Int32, Boolean, Boolean&, Func`4) + 0x1a8
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String, FileMode, FileAccess, FileShare, FileOptions, Int64, UnixFileMode, Int64&, UnixFileMode&, Boolean, Boolean&, Func`4) + 0x164
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String, FileMode, FileAccess, FileShare, FileOptions, Int64, Nullable`1) + 0x98
   at System.IO.FileStream..ctor(String, FileMode, FileAccess, FileShare, Int32, FileOptions, Int64) + 0x98
   at AssetRipper.Export.UnityProjects.ExportCollection.ExportMeta(IExportContainer, Meta, String) + 0x64
   at AssetRipper.Export.UnityProjects.AssetExportCollection`1.Export(IExportContainer, String) + 0x170
   at AssetRipper.Export.UnityProjects.ProjectExporter.Export(GameBundle, CoreConfiguration) + 0x19c
   at AssetRipper.Export.UnityProjects.ExportHandler.Export(GameData, String) + 0x1a0
   at AssetRipper.GUI.Web.Pages.Commands.Export.<AssetRipper-GUI-Web-Pages-ICommand-Execute>d__0.MoveNext() + 0x144
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x24
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x100
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x68
   at AssetRipper.GUI.Web.Pages.Commands.<HandleCommand>d__6`1.MoveNext() + 0xc4
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x24
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x100
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x68
   at AssetRipper.GUI.Web.ErrorHandlingMiddleware.<InvokeAsync>d__0.MoveNext() + 0xb4

Path too long is completely different from the error that caused this issue to be opened.

@ds5678
Copy link
Collaborator

ds5678 commented May 30, 2024

@ds5678
Copy link
Collaborator

ds5678 commented May 30, 2024

Anyway, please make a new issue. This one has been resolved.

@mayagibuyuk
Copy link
Author

got it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants