Skip to content

Ensure Unique Temporary File Names and Guaranteed Clean-up #1044

Open
bhc-wp wants to merge 3 commits into
pnp:devfrom
WorkPoint-A-S:dev
Open

Ensure Unique Temporary File Names and Guaranteed Clean-up #1044
bhc-wp wants to merge 3 commits into
pnp:devfrom
WorkPoint-A-S:dev

Conversation

@bhc-wp

@bhc-wp bhc-wp commented Jul 30, 2024

Copy link
Copy Markdown

This pull request introduces improvements to address file handling issues encountered during site collection creation.

Key Changes

  1. Unique Temporary File Names:

    • Appended a unique identifier (GUID) to temporary file names to prevent collisions.
  2. Ensured File Deletion:

    • Encapsulated resource file operations within a try-finally block to guarantee that temporary files are deleted after processing.

Details

The changes are implemented in the SaveResourceValues method in src/lib/PnP.Framework/Provisioning/ObjectHandlers/Extensions/UserResourceExtensions.cs.

Stack Trace Example:
Here's an example stack trace that demonstrates the issue:

System.Resources.ResourceReader.ReadResources
System.Resources.ResourceReader..ctor
PnP.Framework.Provisioning.ObjectHandlers.Extensions.UserResourceExtensions.SaveResourceValues
PnP.Framework.Provisioning.ObjectHandlers.ObjectLocalization.ExtractObjects
PnP.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.GetRemoteTemplate
Microsoft.SharePoint.Client.WebExtensions.GetProvisioningTemplate
WorkPoint.Core.ProvisioningProvider.ExportSiteCollection

@Adam-it Adam-it added the area: provisioning ⚙ Provisioning engine issue or pull request label Jul 6, 2026
@Adam-it

Adam-it commented Jul 6, 2026

Copy link
Copy Markdown
Member

@bhc-wp first of all sorry for the late reply from our side.
May I kindly ask you to explain how can I reporduce the issue to test out the PR? I provisioned a lot of sites and never bumped into any issues related to file provisioning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: provisioning ⚙ Provisioning engine issue or pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants