mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
add debug logging to finder.cpp
This commit is contained in:
parent
20091031da
commit
adbe74efbe
@ -18,6 +18,7 @@ using namespace vm;
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const bool DebugFind = false;
|
const bool DebugFind = false;
|
||||||
|
const bool DebugStat = false;
|
||||||
|
|
||||||
class Element {
|
class Element {
|
||||||
public:
|
public:
|
||||||
@ -138,6 +139,9 @@ class DirectoryElement: public Element {
|
|||||||
virtual System::FileType stat(const char* name, unsigned* length, bool) {
|
virtual System::FileType stat(const char* name, unsigned* length, bool) {
|
||||||
const char* file = append(allocator, this->name, "/", name);
|
const char* file = append(allocator, this->name, "/", name);
|
||||||
System::FileType type = s->stat(file, length);
|
System::FileType type = s->stat(file, length);
|
||||||
|
if (DebugStat) {
|
||||||
|
fprintf(stderr, "stat %s in %s: %d\n", name, this->name, type);
|
||||||
|
}
|
||||||
allocator->free(file, strlen(file) + 1);
|
allocator->free(file, strlen(file) + 1);
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
@ -492,8 +496,12 @@ class JarElement: public Element {
|
|||||||
|
|
||||||
while (*name == '/') name++;
|
while (*name == '/') name++;
|
||||||
|
|
||||||
return (index ? index->stat(name, length, tryDirectory)
|
System::FileType type = (index ? index->stat(name, length, tryDirectory)
|
||||||
: System::TypeDoesNotExist);
|
: System::TypeDoesNotExist);
|
||||||
|
if (DebugStat) {
|
||||||
|
fprintf(stderr, "stat %s in %s: %d\n", name, this->name, type);
|
||||||
|
}
|
||||||
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const char* urlPrefix() {
|
virtual const char* urlPrefix() {
|
||||||
|
Loading…
Reference in New Issue
Block a user