mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-10 11:50:29 +00:00
Update redbean to report non-writable path instead of crash on CHECK
This commit is contained in:
parent
b535937fca
commit
d78dd65aec
1 changed files with 6 additions and 2 deletions
|
@ -3429,7 +3429,11 @@ static void StoreAsset(char *path, size_t pathlen, char *data, size_t datalen,
|
|||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
CHECK_NE(-1, fcntl(zfd, F_SETLKW, &(struct flock){F_WRLCK}));
|
||||
if (-1 == fcntl(zfd, F_SETLKW, &(struct flock){F_WRLCK})) {
|
||||
WARNF("can't place write lock on file descriptor %d: %s",
|
||||
zfd, strerror(errno));
|
||||
return;
|
||||
}
|
||||
OpenZip(false);
|
||||
now = nowl();
|
||||
a = GetAssetZip(path, pathlen);
|
||||
|
@ -6798,7 +6802,7 @@ static void MakeExecutableModifiable(void) {
|
|||
close(zfd);
|
||||
ft = __ftrace;
|
||||
if ((zfd = OpenExecutable()) == -1) {
|
||||
WARNF("(srvr) can't restore .ape");
|
||||
WARNF("(srvr) can't open executable for modification: %m");
|
||||
}
|
||||
if (ft > 0) {
|
||||
__ftrace = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue