Skip to content
Snippets Groups Projects
Commit 62b85ae6 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

It appears the Windows won't allow rename()ing a file over top

of an existing one.
parent 82a6e7c5
No related branches found
No related tags found
No related merge requests found
Pipeline #8125 passed
......@@ -1106,6 +1106,11 @@ do_request(struct http_session *sess)
goto error_return;
fclose(newfile);
newfile = NULL;
if (remove(path)) {
set_msgf(sess->req, "remove(\"%s\") error", path);
goto error_return;
}
if (rename(npath, path) != 0) {
set_msg(sess->req, "rename(npath, path) error");
goto error_return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment