Am 19/04/2014 15:43, schrieb jessica.l.hamilton@xxxxxxxxx:
+ for (int i = 0; i < paths.CountStrings(); ++i) { + if (error == B_OK && path.SetTo(paths.StringAt(i)) == B_OK + && path.Append(license) == B_OK + && lstat(path.Path(), &st) == 0) { + return B_OK; + } } path.Unset();
Just to add to the noise:- the error == B_OK check doesn't really make much sense there anymore (if the function fails, there wouldn't be any paths to iterate over anyway) - "path", and "st" should be moved into the loop if they aren't used anywhere else. - Maybe we should add a nice way to check for the existence of a path to the API (BPath::Exists()?), as BEntry(path.Path()).Exists() is actually more expensive than it would have to.
Bye, Axel.