ref: ce424fecf0e3b286ac970bbab049026e35ace6be
parent: 1eb3e25a74e04affadcb9bace49c7a56f8a5f2e9
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Fri Jan 6 13:34:58 EST 2012
abaco: dont abort if theres no contenttype
--- a/sys/src/cmd/abaco/urls.c
+++ b/sys/src/cmd/abaco/urls.c
@@ -59,16 +59,15 @@
char buf[BUFSIZE];
int fd, n;
+ n = 0;
snprint(buf, sizeof(buf), "%s/%d/%s", webmountpt, conn, s);
fd = open(buf, OREAD);
- if(fd < 0)
- error("can't open attr file");-
- n = read(fd, buf, sizeof(buf)-1);
- if(n < 0)
- error("can't read");-
- close(fd);
+ if(fd >= 0){+ n = read(fd, buf, sizeof(buf)-1);
+ if(n < 0)
+ n = 0;
+ close(fd);
+ }
buf[n] = '\0';
return (Runestr){runesmprint("%s", buf), n};}
--
⑨