summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Security/Util/URLString.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Security/Util/URLString.cs')
-rw-r--r--src/mscorlib/src/System/Security/Util/URLString.cs17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mscorlib/src/System/Security/Util/URLString.cs b/src/mscorlib/src/System/Security/Util/URLString.cs
index 51ae24cf4a..83f9ce483f 100644
--- a/src/mscorlib/src/System/Security/Util/URLString.cs
+++ b/src/mscorlib/src/System/Security/Util/URLString.cs
@@ -484,10 +484,11 @@ namespace System.Security.Util {
private static void CheckPathTooLong(StringBuilder path)
{
if (path.Length >= (
-#if FEATURE_PATHCOMPAT
- AppContextSwitches.BlockLongPaths ? PathInternal.MaxShortPath :
-#endif
+#if PLATFORM_UNIX
+ Interop.Sys.MaxPath))
+#else
PathInternal.MaxLongPath))
+#endif
{
throw new PathTooLongException(Environment.GetResourceString("IO.PathTooLong"));
}
@@ -513,7 +514,7 @@ namespace System.Security.Util {
// file:/home/johndoe/here
// file:../johndoe/here
// file:~/johndoe/here
- String temp = url;
+ String temp = url;
int nbSlashes = 0;
while(nbSlashes<temp.Length && '/'==temp[nbSlashes])
nbSlashes++;
@@ -533,7 +534,7 @@ namespace System.Security.Util {
{
String temp = url;
-#if !PLATFORM_UNIX
+#if !PLATFORM_UNIX
int index = temp.IndexOf( '/');
if (index != -1 &&
@@ -651,7 +652,7 @@ namespace System.Security.Util {
}
else
{
-#if !PLATFORM_UNIX
+#if !PLATFORM_UNIX
String site = temp.Substring( 0, index );
m_localSite = null;
m_siteString = new SiteString( site );
@@ -680,7 +681,7 @@ namespace System.Security.Util {
{
if (url == null)
{
- throw new ArgumentNullException( "url" );
+ throw new ArgumentNullException( nameof(url) );
}
Contract.EndContractBlock();
@@ -1127,7 +1128,6 @@ namespace System.Security.Util {
}
#if !PLATFORM_UNIX
- [System.Security.SecuritySafeCritical] // auto-generated
internal URLString SpecialNormalizeUrl()
{
// Under WinXP, file protocol urls can be mapped to
@@ -1177,7 +1177,6 @@ namespace System.Security.Util {
}
}
- [System.Security.SecurityCritical] // auto-generated
[DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
[SuppressUnmanagedCodeSecurity]
private static extern void GetDeviceName( String driveLetter, StringHandleOnStack retDeviceName );