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

Really, REALLY long file names and paths are a problem #1

Closed
nurbles opened this issue Mar 18, 2019 · 5 comments
Closed

Really, REALLY long file names and paths are a problem #1

nurbles opened this issue Mar 18, 2019 · 5 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@nurbles
Copy link

nurbles commented Mar 18, 2019

First, I realize this is a brand new tool. Since it is an EXCELLENT tool, I'm pointing out an issue I had with the very first book I tried to convert (using 15 minute chapters [I wish I could set them to 30 min]). AaxAudioConverter works perfectly for most books and until the long path issue is addressed (or I learn C# and address it myself) I will continue to use older, much more difficult tools for the few exceptions. So, here's the issue:

I have a couple SciFi anthologies that apparently list ALL authors. This causes AAXAudioConverter to attempt to create a path that exceeds the default system limit. I got the project and attempted (still am attempting) to get the solution described at https://blogs.msdn.microsoft.com/jeremykuhne/2016/07/30/net-4-6-2-and-long-paths-on-windows-10/ to work. (It says it applies to 4.6.2 and later.)

However, this is the first time I have ever seen a C# project, so my learning curve is steep.

Hopefully, the program can either be built to correctly support the ridiculously long names caused by what is found in the AAX files, or it can offer an option to let us change the name either before we start conversion or at least when the path-too-long error is detected.

@audiamus
Copy link
Owner

Thanks for the feedback.

What I am thinking about is an extra option, on an individual aax file basis, that would allow full customization of the resulting author and book title, for those cases where the heuristic approach fails or generates nonsense.

However, this is the first time I have ever seen a C# project, so my learning curve is steep.

It will be but learning can be rewarding. C# is quite a powerful language and this application makes use of several of its features.

@nurbles
Copy link
Author

nurbles commented Mar 23, 2019

I managed to hack it into working by getting and referencing the NuGet package Pri.LongPath and after the common dialog validates and returns the root path for the output I pre-pend the string "\?" to the path (actually the string is "\\\\?\\" because the backslashes need to be escaped). While this is working it could cause problems with some destination paths.

In the short term it would probably be better to detect a fully qualified file name that exceeds the 260 character limit and offer to stick the magic string that activates long path support if the user OKs the change.

I've never worked with github before, so I'm not sure about trying to check in my changes, so I will wait until asked or better yet, instructed on the best way to check my version of the project in. Sigh. Over 35 years of C development experience and 25+ years of version control systems never prepared my old mind for C#, or GIT. [smile]

@audiamus
Copy link
Owner

In the short term it would probably be better to detect a fully qualified file name that exceeds the 260 character limit and offer to stick the magic string that activates long path support if the user OKs the change.

I think that's the idea I will follow. I will try to reproduce the error and then figure out how to shorten the path.

Over 35 years of C development experience and 25+ years of version control systems never prepared my old mind for C#, or GIT.

Never did much C. Coming from Pascal decades ago (DEC PDP 11 and VAX realtime systems), I more or less went straight to C++. Then, when C# appeared, started there as well. Kind of interesting how C++ and C# mutually influenced each other in recent years. Didn't really like Java, just a matter of personal preference. And I'm not a GIT expert either, I prefer SVN.

@audiamus
Copy link
Owner

audiamus commented Mar 31, 2019

In upcoming version 1.2 long path names will be supported. I added the UNC prefix \\?\ to the directory names.

Nonetheless, such long directory and file names seem rather ugly to me. So, as indicated earlier, I have also added another customization option, in form of a separate dialog, to be opened per aax file via context menu. There you can adjust tag and file name stub for author and book title, in cases where the built-in heuristic approach does not produce satisfactory results.

@audiamus
Copy link
Owner

audiamus commented Apr 6, 2019

Version 1.2 released.

@audiamus audiamus closed this as completed Apr 6, 2019
@audiamus audiamus added enhancement New feature or request bug Something isn't working labels Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants