Roxen.git/
server/
modules/
filesystems/
filesystem.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2018-03-21
2018-03-21 16:15:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>
9ad8d827d3d41c8128162c2ac4626ffa2203c321 (
22
lines) (+
19
/-
3
)
[
Show
|
Annotate
]
Branch:
943638e781c510bb080573c591cc7fd98d08b7d9
Filesystem: Fixed return codes from MKCOL, PUT, MOVE.
Fixes
[WS-226]
and some of
[WS-228]
.
1014:
/* FALL_THROUGH */ case "MKDIR": #if 1
-
return
make_collection(f, id);
+
mixed
ret =
make_collection(f, id);
+
if (ret) return ret;
+
if (id->misc->error_code) {
+
return Roxen.http_status(id->misc->error_code);
+
}
+
return 0;
#else /* !1 */ if(!query("put")) {
1174:
int err = to->errno(); privs = 0; TRACE_LEAVE("PUT: Open failed");
-
return
errno_to_status (err, 1, id);
+
mixed
ret =
errno_to_status (err, 1, id);
+
if (ret) return ret;
+
if (id->misc->error_code) {
+
return Roxen.http_status(id->misc->error_code);
}
-
+
return 0;
+
}
// FIXME: Race-condition. string msg = safe_chmod(norm_f, 0666 & ~(id->misc->umask || 022));
1488:
if(!code) { SIMPLE_TRACE_LEAVE("MOVE: Move failed (%s)", strerror (err_code));
-
return
errno_to_status (err_code, 1, id);
+
mixed
ret =
errno_to_status (err_code, 1, id);
+
if (ret) return ret;
+
if (id->misc->error_code) {
+
return Roxen.http_status(id->misc->error_code);
}
-
+
return 0;
+
}
TRACE_LEAVE("MOVE: Success"); TRACE_LEAVE("Success"); if (size != -1) return Roxen.http_status(204);