浏览代码

Allow StaticFileHandler Path to be changed

LukePulverenti Luke Pulverenti luke pulverenti 13 年之前
父节点
当前提交
692d9dc331
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      MediaBrowser.Common/Net/Handlers/StaticFileHandler.cs

+ 10 - 0
MediaBrowser.Common/Net/Handlers/StaticFileHandler.cs

@@ -10,12 +10,22 @@ namespace MediaBrowser.Common.Net.Handlers
 {
     public class StaticFileHandler : BaseHandler
     {
+        private string _Path;
         public virtual string Path
         {
             get
             {
+                if (!string.IsNullOrWhiteSpace(_Path))
+                {
+                    return _Path;
+                }
+
                 return QueryString["path"];
             }
+            set
+            {
+                _Path = value;
+            }
         }
 
         private bool FileStreamDiscovered = false;