Skip to content

Commit

Permalink
Turned some error output back on.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 14, 2016
1 parent 68aa18c commit ea0a761
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lx_loader.c
Expand Up @@ -1141,7 +1141,7 @@ static LxModule *loadLxModuleByPathInternal(const char *fname, const int depende
return retval;

loadmod_failed:
//fprintf(stderr, "%s failure on '%s: %s'\n", what, fname, strerror(errno));
fprintf(stderr, "%s failure on '%s: %s'\n", what, fname, strerror(errno));
if (io)
fclose(io);
free(module);
Expand Down Expand Up @@ -1214,7 +1214,11 @@ static LxModule *loadLxModuleByModuleNameInternal(const char *modname, const int
// !!! FIXME: decide the right path to the file, or if it's a native replacement library.
char fname[256];
snprintf(fname, sizeof (fname), "%s.dll", modname);
LxModule *retval = loadLxModuleByPathInternal(fname, dependency_tree_depth);

LxModule *retval = NULL;
if (access(fname, F_OK) == 0)
retval = loadLxModuleByPathInternal(fname, dependency_tree_depth);

if (!retval) {
snprintf(fname, sizeof (fname), "./lib%s.so", modname);
for (char *ptr = fname; *ptr; ptr++) {
Expand Down

0 comments on commit ea0a761

Please sign in to comment.