ide: Fixed patch with single file, fixed problem with 'warning' in the id in error outpur

git-svn-id: svn://ultimatepp.org/upp/trunk@13933 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-01-22 13:07:52 +00:00
parent 9411554d8d
commit 26949fcca1
3 changed files with 13 additions and 9 deletions

View file

@ -75,7 +75,7 @@ bool Patch::Load(Stream& in, Progress& pi)
const Vector<String>& h = file.GetKeys();
if(h.GetCount() == 0)
return false;
common_path = h[0];
common_path = GetFileFolder(h[0]);
for(int i = 1; i < h.GetCount(); i++)
common_path.Trim(MatchLen(common_path, h[i]));
common_path.TrimEnd("/");
@ -113,6 +113,7 @@ bool Patch::MatchFiles(const Vector<String>& dir, Progress& pi)
pi.SetText("Matching directories");
int best = 0;
String com_path = common_path;
com_path.Replace("\\", "/");
while(com_path.GetCount()) {
for(String d : dir) {
while(d.GetCount() > 3) {