[Ecls-list] Another delay...

Alexander Gavrilov angavrilov at gmail.com
Sat Oct 2 12:06:47 UTC 2010


Hi, here's one more issue, in this case more convoluted:

If a library load fails for some reason, any subsequent
load failure will cause a strange error about failing
to copy some temporary files, instead of a normal message.
This happens because a block with a NULL handle is
pushed onto the library list, and the second failed
load goes into the 'same handle found' branch.

This fixes it:

@@ -257,11 +257,14 @@ ecl_library_open(cl_object filename, bool force_reload) {
                         goto DO_LOAD;
                 }
 		block = other;
 	} else {
 		si_set_finalizer(block, Ct);
-		cl_core.libraries = CONS(block, cl_core.libraries);
+		if (block->cblock.handle != NULL)
+			cl_core.libraries = CONS(block, cl_core.libraries);
+		else
+			ecl_library_close(block);
 	}
 	}
 	return block;
 }
 
Alexander




More information about the ecl-devel mailing list