Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

bhc-wp
Copy link

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

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

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

Successfully merging this pull request may close these issues.

1 participant