Repository: PowerShell/PowerShell
File: src/System.Management.Automation/namespaces/FileSystemProvider.cs (C#)

Code before:
            {
                return string.Empty;
            }
            catch (SecurityException)
            {
                return string.Empty;
            }
            catch (XPathException)
            {
                return string.Empty;
            }
            finally
            {
                if (reader != null)
                {
                    ((IDisposable)reader).Dispose();
                }
            }

            return string.Empty;
        }

        #endregion

        #region CmdletProvider members
        // OneDrive placeholder support (issue #8315)
#if !UNIX
        [DllImport("ntdll.dll")]
        static extern sbyte RtlQueryProcessPlaceholderCompatibilityMode();
        [DllImport("ntdll.dll")]
        static extern sbyte RtlSetProcessPlaceholderCompatibilityMode(sbyte pcm);

        const sbyte PHCM_APPLICATION_DEFAULT = 0;
        const sbyte PHCM_DISGUISE_PLACEHOLDER = 1;
        const sbyte PHCM_EXPOSE_PLACEHOLDERS = 2;
        const sbyte PHCM_MAX = 2;
        const sbyte PHCM_ERROR_INVALID_PARAMETER = -1;
        const sbyte PHCM_ERROR_NO_TEB = -2;

#endif


        /// <summary>
        /// Starts the File System provider.  This method sets the Home for the
        /// provider to providerInfo.Home if specified, and %USERPROFILE%
        /// otherwise.
        /// </summary>
        /// <param name="providerInfo">
        /// The ProviderInfo object that holds the provider's configuration.
        /// </param>
        /// <returns>

Review comment (suggestion):
```suggestion
        // OneDrive placeholder support
```

Code after:
            {
                return string.Empty;
            }
            catch (SecurityException)
            {
                return string.Empty;
            }
            catch (XPathException)
            {
                return string.Empty;
            }
            finally
            {
                if (reader != null)
                {
                    ((IDisposable)reader).Dispose();
                }
            }

            return string.Empty;
        }

        #endregion

        #region CmdletProvider members
        /// <summary>
        /// Starts the File System provider.  This method sets the Home for the
        /// provider to providerInfo.Home if specified, and %USERPROFILE%
        /// otherwise.
        /// </summary>
        /// <param name="providerInfo">
        /// The ProviderInfo object that holds the provider's configuration.
        /// </param>
        /// <returns>
        /// The updated ProviderInfo object that holds the provider's configuration.
        /// </returns>
        protected override ProviderInfo Start(ProviderInfo providerInfo)
        {
            // Set the home folder for the user
            if (providerInfo != null && string.IsNullOrEmpty(providerInfo.Home))
            {
                // %USERPROFILE% - indicate where a user's home directory is located in the file system.
                string homeDirectory = Environment.GetEnvironmentVariable(Platform.CommonEnvVariableNames.Home);

                if (!string.IsNullOrEmpty(homeDirectory))
                {
                    if (Directory.Exists(homeDirectory))
                    {
                        s_tracer.WriteLine("Home = {0}", homeDirectory);
                        providerInfo.Home = homeDirectory;
                    }