Changeset bb5c6bd92ce8…
Parent 24d1f530806f…
by
Changes to one file · Browse files at bb5c6bd92ce8 Showing diff from parent 24d1f530806f Diff from another changeset...
@@ -260,12 +260,19 @@
char Directory::status(const std::string& hgroot)
{
- char res = 0;
+ bool added = false;
+
+ for (DirsT::iterator i = subdirs_.begin(); i != subdirs_.end(); ++i)
+ {
+ char s = (*i)->status(hgroot);
+ if (s == 'M')
+ return 'M';
+ if (s == 'A')
+ added = true;
+ }
+
struct _stat stat;
- bool added = false;
-
const std::string hrs = hgroot + '\\';
-
for (FilesT::iterator i = files_.begin(); i != files_.end(); ++i)
{
std::string p = hrs + path(i->name);
@@ -284,15 +291,6 @@ added = true;
}
- for (DirsT::iterator i = subdirs_.begin(); i != subdirs_.end(); ++i)
- {
- char s = (*i)->status(hgroot);
- if (s == 'M')
- return 'M';
- if (s == 'A')
- added = true;
- }
-
if (added)
return 'A';
|
Loading...