Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 74e4124

Browse files
authored
Merge pull request #35 from InCerryGit/ls_fix_path_have_space_char
Fix the file not found when the image path contains space escape char
2 parents 368ef1d + a955852 commit 74e4124

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/dotnet-cnblogs/Command/CommandProcessFile.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.ComponentModel.DataAnnotations;
44
using System.IO;
55
using System.Linq;
6+
using System.Web;
67
using Dotnetcnblog.TagHandlers;
78
using Dotnetcnblog.Utils;
89
using McMaster.Extensions.CommandLineUtils;
@@ -59,7 +60,7 @@ public void Execute(CommandContext context)
5960

6061
try
6162
{
62-
var imgPhyPath = Path.Combine(fileDir!, img);
63+
var imgPhyPath = HttpUtility.UrlDecode(Path.Combine(fileDir!, img));
6364
if (File.Exists(imgPhyPath))
6465
{
6566
var imgUrl = ImageUploadHelper.Upload(imgPhyPath);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /