Author: mhabersack
Date: 2008-02-18 12:03:48 -0500 (Mon, 18 Feb 2008)
New Revision: 96080
Modified:
branches/mono-1-9/mcs/class/System.Web/System.Web.Hosting/ChangeLog
branches/mono-1-9/mcs/class/System.Web/System.Web.Hosting/VirtualPathProvider.cs
Log:
Backport of r96079
Modified: branches/mono-1-9/mcs/class/System.Web/System.Web.Hosting/ChangeLog
===================================================================
--- branches/mono-1-9/mcs/class/System.Web/System.Web.Hosting/ChangeLog
2008-02-18 17:01:53 UTC (rev 96079)
+++ branches/mono-1-9/mcs/class/System.Web/System.Web.Hosting/ChangeLog
2008-02-18 17:03:48 UTC (rev 96080)
@@ -1,3 +1,8 @@
+2008-02-18 Marek Habersack <[EMAIL PROTECTED]>
+
+ * VirtualPathProvider.cs: chain up to the previous provider, if
+ prexent. Fixes bug #362038
+
2008-01-06 Marek Habersack <[EMAIL PROTECTED]>
* ApplicationHost.cs: make sure that application with virtualDir
Modified:
branches/mono-1-9/mcs/class/System.Web/System.Web.Hosting/VirtualPathProvider.cs
===================================================================
---
branches/mono-1-9/mcs/class/System.Web/System.Web.Hosting/VirtualPathProvider.cs
2008-02-18 17:01:53 UTC (rev 96079)
+++
branches/mono-1-9/mcs/class/System.Web/System.Web.Hosting/VirtualPathProvider.cs
2008-02-18 17:03:48 UTC (rev 96080)
@@ -63,38 +63,57 @@
public virtual bool DirectoryExists (string virtualDir)
{
+ if (prev != null)
+ return prev.DirectoryExists (virtualDir);
+
return false;
}
public virtual bool FileExists (string virtualPath)
{
+ if (prev != null)
+ return FileExists (virtualPath);
+
return false;
}
- public virtual CacheDependency GetCacheDependency (string
virtualPath,
- IEnumerable
virtualPathDependencies,
- DateTime
utcStart)
+ public virtual CacheDependency GetCacheDependency (string
virtualPath, IEnumerable virtualPathDependencies, DateTime utcStart)
{
+ if (prev != null)
+ return prev.GetCacheDependency (virtualPath,
virtualPathDependencies, utcStart);
+
return null;
}
public virtual string GetCacheKey (string virtualPath)
{
+ if (prev != null)
+ return prev.GetCacheKey (virtualPath);
+
return null;
}
public virtual VirtualDirectory GetDirectory (string virtualDir)
{
+ if (prev != null)
+ return prev.GetDirectory (virtualDir);
+
return null;
}
public virtual VirtualFile GetFile (string virtualPath)
{
+ if (prev != null)
+ return prev.GetFile (virtualPath);
+
return null;
}
public virtual string GetFileHash (string virtualPath,
IEnumerable virtualPathDependencies)
{
+ if (prev != null)
+ return prev.GetFileHash (virtualPath,
virtualPathDependencies);
+
return null;
}
@@ -108,7 +127,10 @@
// This thing throws a nullref when we're not inside an
ASP.NET appdomain, which is what MS does.
VirtualPathProvider provider =
HostingEnvironment.VirtualPathProvider;
VirtualFile file = provider.GetFile (virtualPath);
- return file.Open ();
+ if (file != null)
+ return file.Open ();
+
+ return null;
}
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches