diff --git a/Novel.cs b/Novel.cs index da076a1..6c5f16a 100644 --- a/Novel.cs +++ b/Novel.cs @@ -397,13 +397,16 @@ public bool isVipChapter(int chptindx) return vipChapters.IndexOf(chptindx) != -1; } + Regex legalPath = new Regex(@"[|:?\\/*'<>]|\.+(?:$)"); public void saveChapter(Chapter chpt, bool split) { string savepath; + var legalName = legalPath.Replace(this.name, "_", -1); if (split) - savepath = this.savePath + "\\" + this.name + "-" + chpt.chapterIndex.ToString("D3") + ".txt"; + savepath = this.savePath + "\\" + legalName + "-" + chpt.chapterIndex.ToString("D3") + ".txt"; else - savepath = this.savePath + "\\" + this.name + ".txt"; + savepath = this.savePath + "\\" + legalName + ".txt"; + FileStream fs = new FileStream(savepath, FileMode.Append, FileAccess.Write); StreamWriter sw = new StreamWriter(fs); sw.WriteLine(chpt.ToString() + "\r\n"); @@ -414,7 +417,8 @@ public void saveChapter(Chapter chpt, bool split) } private void saveProgress(int chpt) { - string savepath = this.savePath + "\\" + this.name + ".jjget"; + var legalName = legalPath.Replace(this.name, "_", -1); + string savepath = this.savePath + "\\" + legalName + ".jjget"; FileStream fs = new FileStream(savepath, FileMode.Create, FileAccess.Write); StreamWriter sw = new StreamWriter(fs); sw.Write(chpt.ToString()); diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 6d5c9f8..0487b90 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ [assembly: AssemblyTitle("jjget")] [assembly: AssemblyDescription("晋江下载器")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("fffonion (https://yooooo.us)")] +[assembly: AssemblyCompany("fffonion (https://github.com/fffonion/JJGet/issues)")] [assembly: AssemblyProduct("jjget")] [assembly: AssemblyCopyright("GPLv3")] [assembly: AssemblyTrademark("")] @@ -32,5 +32,5 @@ // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 方法是按如下所示使用“*”: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.2")] -[assembly: AssemblyFileVersion("1.2.2")] +[assembly: AssemblyVersion("1.2.4")] +[assembly: AssemblyFileVersion("1.2.4")] diff --git a/frmAbout.Designer.cs b/frmAbout.Designer.cs index bfb6f7c..a106b25 100644 --- a/frmAbout.Designer.cs +++ b/frmAbout.Designer.cs @@ -68,10 +68,10 @@ private void InitializeComponent() this.linkLabel1.Location = new System.Drawing.Point(10, 107); this.linkLabel1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.linkLabel1.Name = "linkLabel1"; - this.linkLabel1.Size = new System.Drawing.Size(231, 14); + this.linkLabel1.Size = new System.Drawing.Size(238, 14); this.linkLabel1.TabIndex = 2; this.linkLabel1.TabStop = true; - this.linkLabel1.Text = "https://gitee.com/fffonion/JJGet"; + this.linkLabel1.Text = "https://github.com/fffonion/JJGet"; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); // // label3 @@ -135,7 +135,7 @@ private void InitializeComponent() this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.Margin = new System.Windows.Forms.Padding(2); this.Name = "frmAbout"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; diff --git a/frmMain.Designer.cs b/frmMain.Designer.cs index d42fde2..92ee95d 100644 --- a/frmMain.Designer.cs +++ b/frmMain.Designer.cs @@ -141,7 +141,7 @@ private void InitializeComponent() this.lblAuthor.Name = "lblAuthor"; this.lblAuthor.Size = new System.Drawing.Size(44, 17); this.lblAuthor.TabIndex = 2; - this.lblAuthor.Text = "深井冰"; + this.lblAuthor.Text = "某太太"; // // label2 // diff --git a/jjget.csproj b/jjget.csproj index 4402d0f..9b19c46 100644 --- a/jjget.csproj +++ b/jjget.csproj @@ -148,12 +148,11 @@ - + - - +