![](/style/images/good.png)
![](/style/images/bad.png)
Supporting long file paths on Windows
source link: https://puppet.com/blog/supporting-long-file-paths-on-windows/?utm_campaign=Feed%3A+PuppetLabs+%28Puppet+Labs%29
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Supporting long file paths on Windows
Windows has been a huge focus for Puppet since the beginning, and never more so than with our recent news that the whole suite of DSC Resources are now accessible through the Forge, all fully supported by Puppet. Puppet and Windows have always gone hand in hand, but it hasn’t always been plain sailing.
Long file path support in Windows
As the Infrastructure and Automation Content (IAC) team has been hard at work supporting our new DSC Resources, we bumped into a long-standing issue with Windows, Ruby and long file paths. To cover a quick technical summary, the maximum length of a path addressable by the Windows API is MAX_PATH
, or 260 characters. This is unfortunate, because several PowerShell DSC resources include file paths that approach this length. Once they're vendored into Puppet modules, the paths exceed MAX_PATH
, and Puppet runs will fail with inscrutable file not found errors.
Puppet has supported Windows DSC since the days of Puppet 3.8, and we continue to overcome any hurdles we may face on this mission, including contributing to upstream dependencies. The complex nature of supporting Windows (sometimes incredibly long) file paths in Ruby, however, has resulted in our community - and internal teams! - using workarounds and hacks to harness Puppet capabilities. We knew it was time to ensure Puppet and Windows continued to have a happy and healthy partnership, so we got to work.
Community driven engineering teams
With our IAC team blocked without long file path support in Windows, Gabriel, an engineer on our Platform team, decided to dive into this long-standing problem, leading to long file path support being merged into the Ruby main branch. We are thrilled to empower our customers with the entire suite of DSC resources, and we hope to continue to enable customers to automate their enterprise anywhere, regardless of their computing strategy.
You can read more about Gabriel’s technical journey to find a solution on our dev.to blog.
Learn more
Keep up to date with our internal engineering teams on our dev.to blog here.
Find all Puppet supported DSC resources on the Forge.
- Have a request for our Product team? Reach them through the Puppet Idea Portal.
- Our CFP for Puppetize Digital 2021 is open through July 30th. Submit your talk today!
Beth Glenfield is a Product Manager at Puppet.
Share this post via:
Recommend
-
7
Supporting "vhosters" and their config file foibles One of the products I used to have to support in the web hosting business was called Plesk. It was something which basically latched onto an ordinary Linux box with many tentacl...
-
6
Posted 1 month ago2021-01-27T17:30:00+01:00 by Peter Steinberger Updated 1 month ago2021-02-03T16:12:59+01:00
-
8
Closed Bug 1369784 Opened 4 years ago Closed 18 days ago...
-
16
Akai MPC 2000 long file namesApril 11, 2021IntroductionThis is an Akai MPC 2000 XL, a 20 years old sampler / midi-based workstation.
-
3
go-shellcode go-shellcode is a repository of Windows Shellcode runners and supporting utilities. The applications load and execute Shellcode using various API calls or techniques. The available Shellcode runners i...
-
2
New issue Docs: add a note on enabling Windows to build with CMake's long paths #7010
-
8
Not FoundYou just hit a route that doesn't exist... the sadness.LoginRadius empowers businesses to deliver a delightful customer experience and win customer trust. Using the LoginRadius Identity...
-
5
How to remove Windows paths from WSL path after Build 1...
-
1
In this blog post, we learn how to work with file system paths on Node.js. Table of contents: Path-related functionality on Node.js
-
7
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK