Splitting PUP-4866 for PMT and Plug-in Sync to have a ticket for each effort.
This is the PMT effort
It was discovered in
PUP-4854 that long file name paths will break PMT and potentially plugin-sync. The PMT and Puppet core libraries should always use LFN (Long File Name aka "\\?\") paths for module installation to avoid long file name issues.
PUP-4854 we reduced the amount of characters that PMT uses so that it allows for longer module paths to be installed. It helps with longer paths in modules, but it doesn't address the issue completely. We should instead look to use "\\?\" prepended to the path to allow for up to 32,000 characters in paths instead of the current MAX_PATH limit of 260 characters. See MSDN - Naming Files, Paths, and Namespaces.