freebsd-ports/lang/squeak/files/patch-platforms__unix__npsqueak__npsqueak.c
Ion-Mihai Tetcu 2cd2718466 - update to 3.7 [1]
- fix MASTER_SITES [1]
- use SUB_FILES from pkg-plist [2]

PR:		ports/107650 [1]
Submitted by:	Takeshi MUTOH <mutoh@openedu.org> (maintainer) [1]
		itetcu (me) [2]
2007-01-07 22:55:23 +00:00

20 lines
730 B
C

--- platforms/unix/npsqueak/npsqueak.c.orig Sun Mar 20 05:38:26 2005
+++ platforms/unix/npsqueak/npsqueak.c Sat Oct 7 19:56:10 2006
@@ -177,13 +177,16 @@
findFileInPaths(char* result, char *filename, int dirn, char *dirv[PATH_MAX]){
int i;
char path[PATH_MAX];
+ char gzipedpath[PATH_MAX];
for(i= 0; i < dirn; i++){
DPRINT("NP: search \"%s\" in \"%s\" \n",filename,dirv[i]);
strcpy(path, dirv[i]);
strcat(path, filename);
- if (access(path, R_OK) == 0){
+ strcpy(gzipedpath, path);
+ strcat(gzipedpath, ".gz");
+ if (access(path, R_OK) == 0 || access(gzipedpath, R_OK) == 0){
DPRINT("NP: \"%s\" in \"%s\" found\n",filename,dirv[i]);
return strcpy(result, path);
}