mirror of
https://github.com/owendswang/ps5-web-file-manager.git
synced 2026-10-19 02:19:51 -05:00
Fixed PKG install from internal storage.
Adjust back button display effects
This commit is contained in:
1 parent
3efaf24385
commit
939257eda0
4 files changed
+23
-6
No files matched your search
+2
-2
@@ -739,6 +739,7 @@ input[type="checkbox"] {
|
||||
|
||||
.image-preview-stage {
|
||||
width: 100%;
|
||||
height: calc(100vh - 250px);
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1 1 auto;
|
||||
@@ -753,8 +754,7 @@ input[type="checkbox"] {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
max-height: calc(100vh - 250px);
|
||||
pointer-events: none;
|
||||
-webkit-user-drag: none;
|
||||
user-select: none;
|
||||
|
||||
+2
-2
@@ -930,7 +930,7 @@ function updateButtons() {
|
||||
document.getElementById("mkdirBtn").disabled = locked;
|
||||
newTextBtn.disabled = locked;
|
||||
selectAllEl.disabled = locked;
|
||||
parentBtn.disabled = locked || loadingPath || cwd === "/";
|
||||
parentBtn.disabled = cwd === "/";
|
||||
selectAllEl.checked = entries.length > 0 && items.length === entries.length;
|
||||
selectAllEl.indeterminate = items.length > 0 && items.length < entries.length;
|
||||
renderInstallPkgButton(items, locked);
|
||||
@@ -1187,8 +1187,8 @@ async function load(path, scrollTop, force, alertOnError) {
|
||||
if (alertOnError) alert(err.message);
|
||||
return false;
|
||||
} finally {
|
||||
hideContentLoading();
|
||||
loadingPath = null;
|
||||
hideContentLoading();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-1
@@ -2,11 +2,13 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "filemgr_internal.h"
|
||||
#include "mime.h"
|
||||
#include "path_util.h"
|
||||
#include "websrv.h"
|
||||
|
||||
static ssize_t
|
||||
@@ -31,7 +33,7 @@ file_close(void *cls) {
|
||||
|
||||
enum MHD_Result
|
||||
filemgr_fs_request(struct MHD_Connection *conn) {
|
||||
const char *path = MHD_lookup_connection_value(conn, MHD_GET_ARGUMENT_KIND, "path");
|
||||
char *path = fs_path_value(query_value(conn, "path"));
|
||||
struct MHD_Response *resp;
|
||||
enum MHD_Result ret = MHD_NO;
|
||||
struct stat st;
|
||||
@@ -43,6 +45,7 @@ filemgr_fs_request(struct MHD_Connection *conn) {
|
||||
|
||||
if(!path || stat(path, &st) || !S_ISREG(st.st_mode) ||
|
||||
!(file = fopen(path, "rb"))) {
|
||||
free(path);
|
||||
return send_json_error(conn, MHD_HTTP_NOT_FOUND, "file not found");
|
||||
}
|
||||
|
||||
@@ -55,9 +58,11 @@ filemgr_fs_request(struct MHD_Connection *conn) {
|
||||
}
|
||||
ret = websrv_queue_response(conn, MHD_HTTP_OK, resp);
|
||||
MHD_destroy_response(resp);
|
||||
free(path);
|
||||
return ret;
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
free(path);
|
||||
return MHD_NO;
|
||||
}
|
||||
+13
-1
@@ -2,7 +2,10 @@
|
||||
|
||||
#ifndef __linux__
|
||||
|
||||
#include <limits.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef struct pkg_metadata {
|
||||
const char *uri;
|
||||
@@ -57,8 +60,10 @@ pkg_installer_initialize(void) {
|
||||
|
||||
int
|
||||
pkg_installer_install(const char *path) {
|
||||
char install_path[PATH_MAX + sizeof("/user")];
|
||||
const char *uri = path;
|
||||
pkg_metadata_t metadata = {
|
||||
.uri = path,
|
||||
.uri = NULL,
|
||||
.ex_uri = "",
|
||||
.playgo_scenario_id = "",
|
||||
.content_id = "",
|
||||
@@ -69,6 +74,13 @@ pkg_installer_install(const char *path) {
|
||||
playgo_info_t playgo_info = {0};
|
||||
int result;
|
||||
|
||||
if(!path) return -1;
|
||||
if(!strncmp(path, "/data/", 6)) {
|
||||
snprintf(install_path, sizeof(install_path), "/user%s", path);
|
||||
uri = install_path;
|
||||
}
|
||||
metadata.uri = uri;
|
||||
|
||||
pthread_mutex_lock(&installer_lock);
|
||||
result = initialize_locked();
|
||||
if(result) {
|
||||
|
||||
Reference in new issue
Block a user