Jira (PUP-8257) Puppet::FileSystem::Windows should support LFN

0 views
Skip to first unread message

Jacob Helwig (JIRA)

unread,
Dec 15, 2017, 1:00:13 PM12/15/17
to puppe...@googlegroups.com
Jacob Helwig created an issue
 
Puppet / Bug PUP-8257
Puppet::FileSystem::Windows should support LFN
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2017/12/15 9:59 AM
Priority: Normal Normal
Reporter: Jacob Helwig

As mentioned in PUP-4866 & PUP-6152, there is support for using long file names greater than 260 characters in Windows by using the "\\?\" prefix.

Unfortunately, this doesn't quite work with Ruby's normal file path handling, as it also uses "/" on Windows as the path separator, and this needs to be converted to "\" for the "\\?\" prefix to work. Because of the requirement to translate "/" to "\" on the final file path for the "\\?\" LFN prefix to work, we should probably be putting the LFN support directly in to Puppet::FileSystem::Windows, and making sure that we are not using the native Ruby file path handling methods (Eg: File.expand_path, File.join, etc.) anywhere, and are using the Puppet::FileSystem versions instead.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Jacob Helwig (JIRA)

unread,
Dec 15, 2017, 1:01:04 PM12/15/17
to puppe...@googlegroups.com

Ethan Brown (JIRA)

unread,
Apr 5, 2018, 5:34:04 PM4/5/18
to puppe...@googlegroups.com
Ethan Brown commented on Bug PUP-8257
 
Re: Puppet::FileSystem::Windows should support LFN

If we want to land this in Puppet::FileSystem it might make sense to add to the epic PUP-7557

As much as I hate the idea, this might need to be one place where we monkey-patch Ruby classes to fix broken functionality, because there's a number of 3rd party locations (like in minitar) where we won't be able to change the original gem code.  Food for thought as further work happens here.

This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Sep 26, 2018, 8:54:12 PM9/26/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Sprint: Platform Core Grooming

Timothée Eid

unread,
Sep 18, 2020, 3:59:04 AM9/18/20
to puppe...@googlegroups.com
Timothée Eid commented on Bug PUP-8257
 
Re: Puppet::FileSystem::Windows should support LFN

I use puppet on Windows server to deploy a 3rd party application which contains quite long path. And it seems that I'm impacted by this issue

I tried to :

  • shorten the deployment path to a minimum, but it's not enough for some files.
  • use the archive module to wrap the long path into a zip, but it's not as clean as the file resource

Until it is fixed, do you know another workaround about issue ?

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Mihai Buzgau (Jira)

unread,
Nov 10, 2020, 4:42:02 AM11/10/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
 
Change By: Mihai Buzgau
Team: Coremunity Night's Watch

Mihai Buzgau (Jira)

unread,
Nov 10, 2020, 4:43:03 AM11/10/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: ready for triage

GeorgesZ (Jira)

unread,
May 28, 2021, 1:57:27 PM5/28/21
to puppe...@googlegroups.com
GeorgesZ commented on Bug PUP-8257
 
Re: Puppet::FileSystem::Windows should support LFN

It should also work if long path have been enabled. See [Enable Long Paths in Windows 10, Version 1607, and Later

https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later]. For example, the purge attribute of the file resource fails when it tries to remove entries with a path longer than 260 characters with an error like this 

Err: No such file or directory @ <entry> - C:/<longPath>

 

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Austin Boyd (Jira)

unread,
Aug 3, 2021, 10:16:03 PM8/3/21
to puppe...@googlegroups.com
Austin Boyd updated an issue
 
Change By: Austin Boyd
Labels: jira_escalated windows

Austin Boyd (Jira)

unread,
Aug 3, 2021, 10:16:04 PM8/3/21
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket Count: 1
Zendesk Ticket IDs: 45348

Ciprian Badescu (Jira)

unread,
Oct 21, 2021, 7:50:02 AM10/21/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Sprint: ready for triage

Ciprian Badescu (Jira)

unread,
Oct 21, 2021, 7:50:02 AM10/21/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 31, 2022, 4:44:02 PM3/31/22
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages