Use absolute path of new output filename
This commit is contained in:
parent
e70ba4f1f0
commit
9c924d2aa3
|
@ -247,9 +247,10 @@ namespace de4dot.cui {
|
||||||
fileOptions.Add(new OneArgOption("o", null, "Name of output file", "file", (val) => {
|
fileOptions.Add(new OneArgOption("o", null, "Name of output file", "file", (val) => {
|
||||||
if (newFileOptions == null)
|
if (newFileOptions == null)
|
||||||
ExitError("Missing input file");
|
ExitError("Missing input file");
|
||||||
if (string.Equals(Utils.GetFullPath(newFileOptions.Filename), Utils.GetFullPath(val), StringComparison.OrdinalIgnoreCase))
|
var newFilename = Utils.GetFullPath(val);
|
||||||
ExitError(string.Format("Output file can't be same as input file ({0})", val));
|
if (string.Equals(Utils.GetFullPath(newFileOptions.Filename), newFilename, StringComparison.OrdinalIgnoreCase))
|
||||||
newFileOptions.NewFilename = val;
|
ExitError(string.Format("Output file can't be same as input file ({0})", newFilename));
|
||||||
|
newFileOptions.NewFilename = newFilename;
|
||||||
}));
|
}));
|
||||||
fileOptions.Add(new OneArgOption("p", null, "Obfuscator type (see below)", "type", (val) => {
|
fileOptions.Add(new OneArgOption("p", null, "Obfuscator type (see below)", "type", (val) => {
|
||||||
if (newFileOptions == null)
|
if (newFileOptions == null)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user