Fixed a problem when one of the parent directories contains a dot.
This commit is contained in:
parent
bbe41696b1
commit
0952a5e22d
|
@ -151,17 +151,8 @@ namespace de4dot.code {
|
|||
}
|
||||
|
||||
string GetDefaultNewFilename() {
|
||||
int dotIndex = options.Filename.LastIndexOf('.');
|
||||
string noExt, ext;
|
||||
if (dotIndex != -1) {
|
||||
noExt = options.Filename.Substring(0, dotIndex);
|
||||
ext = options.Filename.Substring(dotIndex);
|
||||
}
|
||||
else {
|
||||
noExt = options.Filename;
|
||||
ext = "";
|
||||
}
|
||||
return noExt + "-cleaned" + ext;
|
||||
string newFilename = Path.GetFileNameWithoutExtension(options.Filename) + "-cleaned" + Path.GetExtension(options.Filename);
|
||||
return Path.Combine(Path.GetDirectoryName(options.Filename), newFilename);
|
||||
}
|
||||
|
||||
public void Load(IList<IDeobfuscator> deobfuscators) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user