extras/selfextract.c
changeset 1631 1aec60db9326
parent 1016 957c97389257
equal deleted inserted replaced
1630:5123a32160af 1631:1aec60db9326
    38 {
    38 {
    39     int rc = 0;
    39     int rc = 0;
    40 
    40 
    41     if (!PHYSFS_init(argv[0]))
    41     if (!PHYSFS_init(argv[0]))
    42     {
    42     {
    43         printf("PHYSFS_init() failed: %s\n", PHYSFS_getLastError());
    43         printf("PHYSFS_init() failed: %s\n", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
    44         return 42;
    44         return 42;
    45     } /* if */
    45     } /* if */
    46 
    46 
    47     rc = PHYSFS_addToSearchPath(argv[0], 0);
    47     rc = PHYSFS_addToSearchPath(argv[0], 0);
    48     if (!rc)
    48     if (!rc)
    49     {
    49     {
    50         printf("Couldn't find self-extract data: %s\n", PHYSFS_getLastError());
    50         printf("Couldn't find self-extract data: %s\n", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
    51         printf("This might mean you didn't append a zipfile to the binary.\n");
    51         printf("This might mean you didn't append a zipfile to the binary.\n");
    52         return 42;
    52         return 42;
    53     } /* if */
    53     } /* if */
    54 
    54 
    55     char **files = PHYSFS_enumerateFiles("/");
    55     char **files = PHYSFS_enumerateFiles("/");