提交 7640cfda 编写于 作者: W WMJ

-修复无法保存到网络路径的问题(closes #144)

上级 abf02108
......@@ -252,7 +252,7 @@ namespace PDFPatcher.Common
var ps = p2[0];
bool p2r;
if ((p2r = IsDirectorySeparator(ps)) && rootAsRelative == false // note 不能调转 && 参数的顺序,p2r 在后面有用
|| p2.Length > 1 && p2[1] == Path.VolumeSeparatorChar) {
|| p2.Length > 1 && (p2[1] == Path.VolumeSeparatorChar || p2[1] == ps)) {
return path;
}
......@@ -505,6 +505,9 @@ namespace PDFPatcher.Common
r = true;
++v;
}
else if (i == 1 && r) {
++v;
}
continue;
}
if (s.Length == 1 && s[0] == '.') {
......
......@@ -48,15 +48,15 @@ namespace PDFPatcher.Processor
}
var targetPath = options.OutputPath;
if (Directory.Exists(targetPath) == false) {
Directory.CreateDirectory(targetPath);
}
var ranges = PageRangeCollection.Parse(options.PageRange, 1, pdf.NumberOfPages, true);
var loadCount = loadDocProgressWeight + ranges.TotalPages;
Tracker.SetProgressGoal(loadCount);
var op = targetPath;
var om = options.FileMask;
try {
if (Directory.Exists(targetPath) == false) {
Directory.CreateDirectory(targetPath);
}
Tracker.TraceMessage("正在导出图片。");
Tracker.TrackProgress(loadDocProgressWeight);
if (FileHelper.HasFileNameMacro(op)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册