Skip to content

Commit

Permalink
Fix issues #20: 安装未识别为正确的html
Browse files Browse the repository at this point in the history
  • Loading branch information
ixre committed Apr 6, 2020
1 parent a0ccb20 commit 80fd99e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/JR.Cms/ToDo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
// 用于返回页面的archive对象
//


// 新建文件报错
15 changes: 8 additions & 7 deletions src/JR.Cms/Web/Mvc/Comm/CmsInstallWiz.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ namespace JR.Cms.WebImpl.Mvc.Controllers
public class CmsInstallWiz
{
public const string FILE_DB_SQLITE = "install/db/sqlite.db";
public const string FILE_DB_OLEDB = "install/db/access.mdb";
public const string FILE_SETTING = "config/cms.conf";
public const string MYSQL_INSTALL_SCRIPT = "install/db/mysql.sql";
public const string MSSQL_INSTALL_SCRIPT = "install/db/mssql.sql";
public const string SQLite_INSTALL_SCRIPT = "install/db/sqlite.sql";
private const string FILE_DB_OLEDB = "install/db/access.mdb";
private const string FILE_SETTING = "config/cms.conf";
private const string MYSQL_INSTALL_SCRIPT = "install/db/mysql.sql";
private const string MSSQL_INSTALL_SCRIPT = "install/db/mssql.sql";
private const string SQLite_INSTALL_SCRIPT = "install/db/sqlite.sql";

public const string INSTALL_LOCK = "config/install.lock";
private const string INSTALL_LOCK = "config/install.lock";


public enum InstallCode
private enum InstallCode
{
/// <summary>
/// 已经安装成功
Expand Down Expand Up @@ -486,6 +486,7 @@ public Task ProcessInstallRequest(ICompatibleHttpContext context)
FileInfo fi = new FileInfo(Cms.PhysicPath + "/install/install.html");
if (!fi.Exists) return context.Response.WriteAsync("系统丢失文件,无法启动安装向导");
var bytes = File.ReadAllBytes(fi.FullName);
context.Response.ContentType("text/html;charset=utf-8");
context.Response.WriteAsync(bytes);
return SafetyTask.CompletedTask;
}
Expand Down

0 comments on commit 80fd99e

Please sign in to comment.