mirror of
https://github.com/LisherSong/ps5-web-file-manager.git
synced 2026-10-06 09:00:26 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76f8fe21d2 |
No files matched your search
@@ -13,7 +13,7 @@ ifeq ($(MAKECMDGOALS),)
|
||||
endif
|
||||
endif
|
||||
|
||||
VERSION_TAG := v0.6
|
||||
VERSION_TAG := v0.7
|
||||
TITLE_ID := FMGR88888
|
||||
PYTHON ?= python3
|
||||
STRIP ?= $(PS5_PAYLOAD_SDK)/bin/prospero-strip
|
||||
|
||||
+23
-3
@@ -43,18 +43,23 @@ body {
|
||||
}
|
||||
|
||||
.topbar {
|
||||
flex: 0 0 auto;
|
||||
height: 54px;
|
||||
min-height: 54px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12px 30px;
|
||||
padding: 0 30px;
|
||||
background: #1b2026;
|
||||
border-bottom: 1px solid #2d343d;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.path {
|
||||
height: 54px;
|
||||
color: #aab4be;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
font-size: 22px;
|
||||
line-height: 1.35;
|
||||
line-height: 54px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -63,13 +68,15 @@ body {
|
||||
}
|
||||
|
||||
.space-info {
|
||||
height: 54px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex: 0 1 auto;
|
||||
max-width: 58vw;
|
||||
color: #c9d3dc;
|
||||
font-size: 18px;
|
||||
line-height: 1.35;
|
||||
line-height: 54px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -136,10 +143,14 @@ body {
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
flex: 0 0 auto;
|
||||
height: 84px;
|
||||
min-height: 84px;
|
||||
justify-content: space-between;
|
||||
padding: 14px 30px;
|
||||
background: #15191e;
|
||||
border-bottom: 1px solid #2d343d;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tool-left {
|
||||
@@ -147,6 +158,13 @@ body {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.toolbar .tool-left,
|
||||
.toolbar .tool-right {
|
||||
height: 54px;
|
||||
min-height: 54px;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.tool-left > *,
|
||||
.tool-right > * {
|
||||
margin: 0 12px 0 0;
|
||||
@@ -164,6 +182,7 @@ body {
|
||||
|
||||
button,
|
||||
.button {
|
||||
height: 54px;
|
||||
min-height: 54px;
|
||||
min-width: 96px;
|
||||
padding: 0 20px;
|
||||
@@ -372,6 +391,7 @@ input[type="checkbox"] {
|
||||
|
||||
.row-action {
|
||||
width: 100%;
|
||||
height: 78px;
|
||||
min-height: 78px;
|
||||
padding: 16px 18px;
|
||||
border: 0;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ let textEditorOriginal = "";
|
||||
let textEditorBusy = false;
|
||||
let L = {};
|
||||
|
||||
const APP_VERSION = "v0.6";
|
||||
const APP_VERSION = "v0.7";
|
||||
const LAST_PATH_KEY = "ps5-web-file-mgr:last-path";
|
||||
const LOADING_DISPLAY_DELAY = 250;
|
||||
|
||||
|
||||
+12
-27
@@ -4,8 +4,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <ps5/kernel.h>
|
||||
@@ -33,9 +31,16 @@ int sceAppInstUtilAppInstallAll(void *);
|
||||
|
||||
static int
|
||||
install_file(const char *path, const uint8_t *data, size_t size) {
|
||||
struct stat st;
|
||||
FILE *f;
|
||||
|
||||
if(!(f = fopen(path, "w"))) {
|
||||
if(!stat(path, &st)) {
|
||||
return 0;
|
||||
}
|
||||
if(errno != ENOENT) {
|
||||
return -1;
|
||||
}
|
||||
if(!(f = fopen(path, "wb"))) {
|
||||
return -1;
|
||||
}
|
||||
if(fwrite(data, size, 1, f) != 1) {
|
||||
@@ -65,32 +70,13 @@ install_app(const char *title_id, const char *dir) {
|
||||
}
|
||||
|
||||
static int
|
||||
needs_update(const char *path, const uint8_t *expected, size_t expected_size) {
|
||||
needs_install_file(const char *path) {
|
||||
struct stat st;
|
||||
uint8_t *buf;
|
||||
FILE *f;
|
||||
int mismatch;
|
||||
|
||||
if(stat(path, &st) || st.st_size != (off_t)expected_size) {
|
||||
if(stat(path, &st)) {
|
||||
return 1;
|
||||
}
|
||||
if(!(f = fopen(path, "r"))) {
|
||||
return 1;
|
||||
}
|
||||
if(!(buf = malloc(expected_size))) {
|
||||
fclose(f);
|
||||
return 1;
|
||||
}
|
||||
if(fread(buf, 1, expected_size, f) != expected_size) {
|
||||
free(buf);
|
||||
fclose(f);
|
||||
return 1;
|
||||
}
|
||||
fclose(f);
|
||||
|
||||
mismatch = memcmp(buf, expected, expected_size);
|
||||
free(buf);
|
||||
return mismatch != 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -111,8 +97,7 @@ app_install_if_needed(void) {
|
||||
|
||||
if(stat(base_dir, &st)) {
|
||||
update_needed = 1;
|
||||
} else if(needs_update(param_path, param_json, param_json_size) ||
|
||||
needs_update(icon_path, icon0_png, icon0_png_size)) {
|
||||
} else if(needs_install_file(param_path) || needs_install_file(icon_path)) {
|
||||
update_needed = 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user