mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-12-22 03:26:17 +00:00
added the Uzbek language я исправил потвердите (#3306)
* added the Uzbek language * Potential fix for code scanning alert no. 1: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 2: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 3: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 13: Time-of-check time-of-use filesystem race condition Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 12: Time-of-check time-of-use filesystem race condition Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 4: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 11: Time-of-check time-of-use filesystem race condition Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 5: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 7: Unsafe jQuery plugin Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 8: Unsafe jQuery plugin Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 14: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 10: Time-of-check time-of-use filesystem race condition Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 15: Time-of-check time-of-use filesystem race condition Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 9: Call to `memset` may be deleted Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update bootstrap.js * Update ci.yml * Potential fix for code scanning alert no. 17: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 16: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update ci.yml * Update ci.yml --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
@@ -7963,28 +7963,32 @@ delete_file(struct mg_connection *conn, const char *path)
|
||||
}
|
||||
|
||||
/* This is an existing file (not a directory).
|
||||
* Check if write permission is granted. */
|
||||
if (access(path, W_OK) != 0) {
|
||||
/* File is read only */
|
||||
send_http_error(
|
||||
conn,
|
||||
403,
|
||||
"Error: Delete not possible\nDeleting %s is not allowed",
|
||||
path);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Try to delete it. */
|
||||
* Try to delete it directly and handle errors. */
|
||||
if (mg_remove(conn, path) == 0) {
|
||||
/* Delete was successful: Return 204 without content. */
|
||||
send_http_error(conn, 204, "%s", "");
|
||||
} else {
|
||||
/* Delete not successful (file locked). */
|
||||
send_http_error(conn,
|
||||
423,
|
||||
"Error: Cannot delete file\nremove(%s): %s",
|
||||
path,
|
||||
strerror(ERRNO));
|
||||
/* Check the reason for failure. */
|
||||
if (ERRNO == EACCES || ERRNO == EPERM) {
|
||||
send_http_error(
|
||||
conn,
|
||||
403,
|
||||
"Error: Delete not possible\nDeleting %s is not allowed",
|
||||
path);
|
||||
} else if (ERRNO == EBUSY || ERRNO == EAGAIN) {
|
||||
send_http_error(conn,
|
||||
423,
|
||||
"Error: Cannot delete file\nremove(%s): %s",
|
||||
path,
|
||||
strerror(ERRNO));
|
||||
} else {
|
||||
send_http_error(conn,
|
||||
500,
|
||||
"Error: Could not delete %s\nremove(%s): %s",
|
||||
path,
|
||||
path,
|
||||
strerror(ERRNO));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* !NO_FILES */
|
||||
|
||||
Reference in New Issue
Block a user