Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Archive: DSC resouce does not support paths longer than 260 #204

Open
pubsquash opened this issue Feb 28, 2022 · 0 comments
Open

Archive: DSC resouce does not support paths longer than 260 #204

pubsquash opened this issue Feb 28, 2022 · 0 comments

Comments

@pubsquash
Copy link

pubsquash commented Feb 28, 2022

Details of the scenario you tried and the problem that is occurring

Trying to extract Oracle 19c package, there is one file which the archive DSC resource is failing on.

This is the path:
C:\Utilities\DSC\Source\b9c366ec-18c4-4d1e-86ed-feca54f0e966\client\stage\Components\oracle.jdk\1.8.0.201.0\1\DataFiles\Expanded\filegroup3\lib\missioncontrol\plugins\com.jrockit.mc.console.ui.notification_5.5.2.174165\com.jrockit.mc.console.ui.notification_contexts.xml

Yes I could shorten the path but perhaps it would be a better solution to support long paths with: "\\?\"

Verbose logs showing the problem

C:\Utilities\DSC\Source\b9c366ec-18c4-4d1e-86ed-feca54f0e966\client\stage\Components\oracle.jdk\1.8.0.201.0\1\DataFiles
\Expanded\filegroup3\lib\missioncontrol\plugins\com.jrockit.mc.console.ui.notification_5.5.2.174165\com.jrockit.mc.cons
ole.ui.notification_contexts.xml
VERBOSE: [XW0000E4UIS0001]: LCM: [ End Set ] [[Archive]Unzip] in 77.3050 seconds.
PowerShell DSC resource MSFT_ArchiveResource failed to execute Set-TargetResource functionality with error message:
An error was encountered while copying the archived file to C:\Utilities\DSC\Source\b9c366ec-18c4-4d1e-86ed-feca54f0e96
6\client\stage\Components\oracle.jdk\1.8.0.201.0\1\DataFiles\Expanded\filegroup3\lib\missioncontrol\plugins\com.jrockit
.mc.console.ui.notification_5.5.2.174165\com.jrockit.mc.console.ui.notification_contexts.xml
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : localhost

Suggested solution to the issue

Support long paths with: "\\?\"

The DSC configuration that is used to reproduce the issue (as detailed as possible)

        Archive $ArchiveResourceName
        {
            Ensure      = "Present"
            Path        = $LocalArchivePath
            Destination = $ExtractDestination
            DependsOn   = "[xRemoteFile]$xRemoteFileResourceName"
            Force = $true
            Checksum = "ModifiedDate"
            Validate = $true
        }

The operating system the target node is running

Version and build of PowerShell the target node is running

Version of the DSC module that was used ('dev' if using current dev branch)

ImplementedAs Name ModuleName Version Properties


PowerShell Archive PSDesiredStateConfiguration 1.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant