diff --git a/lib/afflib.cpp b/lib/afflib.cpp index 703698c..e4b10b2 100644 --- a/lib/afflib.cpp +++ b/lib/afflib.cpp @@ -355,16 +355,20 @@ AFFILE *af_open_with(const char *url,int flags,int mode, struct af_vnode *v) AFFILE *af_open(const char *filename,int flags,int mode) { +printf("af_open 1\n"); if(!aff_initialized) af_initialize(); +printf("af_open 2\n"); if(ends_with(filename,".E01") || ends_with(filename,".e01")){ errno = EINVAL; return 0; } +printf("af_open 3\n"); if(flags & O_WRONLY){ errno = EINVAL; return 0; // this flag not supported } +printf("af_open 4\n"); int exists = (flags & O_CREAT) ? 0 : 1; // file must exist if O_CREAT not specified @@ -372,10 +376,13 @@ AFFILE *af_open(const char *filename,int flags,int mode) for(int i = 0; af_vnode_array[i]; i++){ /* Check to see if the implementation identifies the file */ if( (*af_vnode_array[i]->identify)(filename,exists)==1 ){ +printf("af_open 5\n"); AFFILE *af = af_open_with(filename,flags,mode,af_vnode_array[i]); +printf("af_open 6\n"); return af; } } +printf("af_open 7\n"); errno = EINVAL; if(exists && access(filename, R_OK) != 0) errno = ENOENT; return 0; // can't figure it out; must be an invalid extension