Skip to content

Commit

Permalink
webMAN MOD 1.47.45
Browse files Browse the repository at this point in the history
- Fixed issue in option Unmount Game + Delete net/ntfs cached ISO
  • Loading branch information
aldostools committed Sep 1, 2023
1 parent 75b0eac commit b0534e6
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 12 deletions.
Binary file modified _Projects_/updater/pkgfiles/USRDIR/webftp_server_full.sprx
Binary file not shown.
Binary file modified _Projects_/updater/pkgfiles/USRDIR/webftp_server_lite.sprx
Binary file not shown.
Binary file modified _Projects_/updater/pkgfiles/USRDIR/webftp_server_noncobra.sprx
Binary file not shown.
Binary file not shown.
Binary file modified _Projects_/updater/update/dev_hdd0/plugins/webftp_server.sprx
Binary file not shown.
Binary file modified _Projects_/updater/update/dev_hdd0/plugins/webftp_server_lite.sprx
Binary file not shown.
Binary file not shown.
29 changes: 19 additions & 10 deletions include/mount/mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ static void set_bdvd_as_app_home(void)
}
}

static void do_umount_iso(void)
static void do_umount_iso(bool clean)
{
unsigned int real_disctype, effective_disctype, iso_disctype;
cobra_get_disc_type(&real_disctype, &effective_disctype, &iso_disctype);
Expand All @@ -1023,7 +1023,7 @@ static void do_umount_iso(void)
}

char filename[MAX_PATH_LEN];
if(read_file(DEL_CACHED_ISO, filename, MAX_PATH_LEN, 0))
if(clean && read_file(DEL_CACHED_ISO, filename, MAX_PATH_LEN, 0))
{
cellFsUnlink(DEL_CACHED_ISO);
cellFsUnlink(filename);
Expand Down Expand Up @@ -1059,7 +1059,7 @@ static void do_umount(bool clean)
#ifndef LITE_EDITION
swap_file(PSP_EMU_PATH, "psp_emulator.self", "psp_emulator.self.dec_edat", "psp_emulator.self.original"); // restore original psp_emulator.self
#endif
do_umount_iso(); // unmount iso
do_umount_iso(clean); // unmount iso
#ifdef PS2_DISC
do_umount_ps2disc(false); // unmount ps2disc
#endif
Expand Down Expand Up @@ -1157,11 +1157,16 @@ static void cache_file_to_hdd(char *source, char *target, const char *basepath,
sprintf(target, "/dev_hdd0%s", basepath);
cellFsMkdir(target, DMODE);

cellFsUnlink(DEL_CACHED_ISO);

strcat(target, get_filename(source)); // add file name

if((copy_in_progress || fix_in_progress) == false && not_exists(target))
char filename[MAX_PATH_LEN];
if(read_file(DEL_CACHED_ISO, filename, MAX_PATH_LEN, 0) && !IS(target, filename))
{
cellFsUnlink(DEL_CACHED_ISO);
cellFsUnlink(filename);
}

if((copy_in_progress | fix_in_progress) == false && not_exists(target))
{
sprintf(msg, "%s %s\n"
"%s %s", STR_COPYING, source, STR_CPYDEST, basepath);
Expand All @@ -1178,15 +1183,19 @@ static void cache_file_to_hdd(char *source, char *target, const char *basepath,
cellFsUnlink(target);
show_msg_with_icon(ICON_EXCLAMATION, STR_CPYABORT);
}
else if(webman_config->deliso)
}

if(file_exists(target))
{
strcpy(source, target);

if(webman_config->deliso)
{
save_file(DEL_CACHED_ISO, target, SAVE_ALL);
}
}

if(file_exists(target)) strcpy(source, target);
}

do_umount(false); // umount + delete previous cached file
}

Expand Down
2 changes: 1 addition & 1 deletion include/mount/ps2_disc.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static void do_umount_ps2disc(bool mount)
static bool mount_ps2disc(char *path)
{
do_umount_ps2disc(true);
do_umount_iso();
do_umount_iso(true);

if(!isDir(path)) return false;

Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ static void do_umount(bool clean);
static void mount_autoboot(void);
static bool mount_game(const char *_path, u8 do_eject);
#ifdef COBRA_ONLY
static void do_umount_iso(void);
static void do_umount_iso(bool clean);
static void unload_vsh_gui(void);
static void set_app_home(const char *game_path);
static bool is_iso_0(const char *filename);
Expand Down

0 comments on commit b0534e6

Please sign in to comment.