From f540160ff387ccefb2bf06b6faaae8d8873e3ee6 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 26 Jun 2024 09:25:01 +1200 Subject: [PATCH] esv: remove invalid path checks They're catering to too much of an edge case. It can just be checked with std.file.exists() later on. --- esv.d | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/esv.d b/esv.d index 1ff6e0b..c322b01 100644 --- a/esv.d +++ b/esv.d @@ -24,7 +24,7 @@ import std.conv : to, ConvException; import std.file : exists, mkdirRecurse, write, FileException; import std.format : format; import std.getopt : getopt, GetOptException; -import std.path : baseName, dirName, expandTilde, isValidPath; +import std.path : baseName, dirName, expandTilde; import std.process : environment, executeShell; import std.stdio : writeln, writefln; import std.string : splitLines; @@ -107,12 +107,8 @@ config: .expandTilde(); try { if (CFlag != "") { /* if -C was given */ - enforceDie(CFlag.isValidPath(), CFlag ~ ": invalid path"); configPath = CFlag.expandTilde(); } else { - enforceDie(configPath.isValidPath(), - configPath ~ ": invalid path"); - if (!configPath.exists()) { mkdirRecurse(dirName(configPath)); configPath.write(format!