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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Support Long Paths (>260 characters) #56

Closed
DJDoubleD opened this issue Oct 15, 2023 · 1 comment
Closed

[Feature Request] Support Long Paths (>260 characters) #56

DJDoubleD opened this issue Oct 15, 2023 · 1 comment
Assignees
Labels
Enhancement Enhancement of existing functionality Feature New feature or request

Comments

@DJDoubleD
Copy link
Owner

馃殌 Feature Request

Is your feature request related to a problem? Please describe.

When downloading tracks for which the total path length exceeds the Windows maximum of 260 characters, the following error occurs:

Unknown error during Track Download.
System.IO.DirectoryNotFoundException: Could not find a part of the path 'Z:\qobuz\- Labels\Argon Verlag\Rebecca Yarros\The things we leave unfinished - Eine Familie. Zwei Geschichten. Tausend Gef眉hle. (Ungek眉rzte Lesung [up152nh72omda]\MP3\185 - Kapitel 185 - The things we leave unfinished - Eine Familie. Zwei Geschichten. Tausend Gef眉hle.mp3'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at QobuzDownloaderX.Shared.DownloadManager.<DownloadFileAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at QobuzDownloaderX.Shared.DownloadManager.<DownloadTrackAsync>d__28.MoveNext()

Describe the solution you'd like

Support longer paths, if enabled on Windows 10, Version 1607, and Later


Additional context

An example long track which will give problems if downloaded as part of a label in nested folders:
Kapitel 185 - The things we leave unfinished - Eine Familie. Zwei Geschichten. Tausend Gef眉hle

@DJDoubleD DJDoubleD added Feature New feature or request Enhancement Enhancement of existing functionality labels Oct 15, 2023
@DJDoubleD DJDoubleD self-assigned this Oct 15, 2023
@DJDoubleD
Copy link
Owner Author

Solution will still require users to Enable Long Paths in Windows 10 (Version 1607 and Later)

Will need to add this to the release notes and attach the zipped .reg file to the release (GitHub doesn't allow .ref attachments).
Alternative Powershell command:

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

EnableLongPaths.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhancement of existing functionality Feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant