cologic's attached patch should've been OK to cover the lib side back then; It would've worked well for all the then supported Windows versions but since so many years have passed and we support only the latest Win10 client editions and on by now, there is an easier solution that needs no code change in the dc lib.
There's an application manifest for signaling long path awareness, and it makes all the API calls that used in the dcpp lib (see cologic's patch) long path supportive in themselves, using the original path format. This works from Win10 1607 and on. See <https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file- path-limitation?tabs=registry>. Note that the above doc contains a blatant misininformation as the sole addition of the app manifest will provide the desired behavior. The mentioned GPO is not needed at all, it is for controlling legacy apps in OS level. This is reportedly confirmed by real world behavior and even by multiple high profile MS engineers, like Raymond Chen in their posts and blogs. See https://www.reddit.com/r/sysadmin/comments/qg8qy5/long_paths_now_work_in_explorer_windows_21h1 The effect on the GUI part of DC++ is more complicated, here's the breakdown : dwt uses SHBrowseForFolderW and SHGetPathFromIDListW for Folder dialog and DragQueryFileW for dragdrop, all of which returns long paths once the manifest is present. The wrapper code around these creates classic MAX_PATH sized buffers, so those must be changed to be able to hold long paths. In file Load and Save dialog classes, dwt uses GetOpenFileNameW and GetSaveFileNameW respectively and these don't support long paths at all. So this code is safe, but needs to be rewritten to wrap around the modern IFileOpenDialog / IFileSaveDialog interfaces, in order to support long paths. Effects on other libs, like gettext, geoip, dwarf is not checked yet but especially since we currently use older versions of these, some or all of them could be problematic. -- You received this bug notification because you are a member of Dcplusplus-team, which is subscribed to DC++. https://bugs.launchpad.net/bugs/238482 Title: Create support for paths longer than 255 characters Status in DC++: Confirmed Bug description: I'm getting this error on 2 files with long file-/pathnames (whole path is bigger than 255 characters). At least I think the length of the path causes the problem, as I still can can access those 2 files with other programs. DC++ version: 0.699 To manage notifications about this bug go to: https://bugs.launchpad.net/dcplusplus/+bug/238482/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp