Fix long path loading issue (#735)#741
Closed
magnetProgramming wants to merge 1 commit intompvnet-player:mainfrom
Closed
Fix long path loading issue (#735)#741magnetProgramming wants to merge 1 commit intompvnet-player:mainfrom
magnetProgramming wants to merge 1 commit intompvnet-player:mainfrom
Conversation
|
I would note that while \?\C:\Users\user\videos\video.mkv is correct for a local drive (C, D, etc.) I believe windows expects slightly different for network shares / UNC Paths. |
Collaborator
|
I think the proper fix is enabling long paths in windows. https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Support for long file paths on Windows (#735)
This fixes the issue where mpvnet.exe wouldn’t open files with really long paths when launched from the command line or another program.
I updated the ConvertFilePath method to add the \?\ prefix to long Windows paths. That way, it can handle paths over 260 characters just like mpv.exe does.
Tested with short and long filenames and everything seems to work fine. Let me know if I should change anything. This is my first contribution so sorry if I messed up something.