diff --git a/Bot-Utils/Properties/AssemblyInfo.cs b/Bot-Utils/Properties/AssemblyInfo.cs index afcd53c..a85c4d0 100644 --- a/Bot-Utils/Properties/AssemblyInfo.cs +++ b/Bot-Utils/Properties/AssemblyInfo.cs @@ -42,5 +42,5 @@ using System.Runtime.InteropServices; * 1.1.3 Variables parsing now as a String * 1.1.4 add Woff as Binary type * 1.1.5 add a function to send an object as json directly - * 1.1.6 rename functions and make SendFileResponse with a parameter for the folder + * 1.1.6 rename functions and make SendFileResponse with a parameter for the folder, */ diff --git a/Bot-Utils/Webserver.cs b/Bot-Utils/Webserver.cs index 8208b32..eccf400 100644 --- a/Bot-Utils/Webserver.cs +++ b/Bot-Utils/Webserver.cs @@ -48,8 +48,8 @@ namespace BlubbFish.Utils.IoT.Bots { } else { restr = restr.Substring(1); } - if(restr == "") { - restr = "index.html"; + if(Directory.Exists(folder + "/" + restr)) { + restr += "/index.html"; } String end = restr.IndexOf('.') != -1 ? restr.Substring(restr.IndexOf('.') + 1) : ""; if(File.Exists(folder + "/" + restr)) {