Skip to content

Commit b0534e6

Browse files
committed
webMAN MOD 1.47.45
- Fixed issue in option Unmount Game + Delete net/ntfs cached ISO
1 parent 75b0eac commit b0534e6

File tree

10 files changed

+21
-12
lines changed

10 files changed

+21
-12
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

include/mount/mount.h

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ static void set_bdvd_as_app_home(void)
999999
}
10001000
}
10011001

1002-
static void do_umount_iso(void)
1002+
static void do_umount_iso(bool clean)
10031003
{
10041004
unsigned int real_disctype, effective_disctype, iso_disctype;
10051005
cobra_get_disc_type(&real_disctype, &effective_disctype, &iso_disctype);
@@ -1023,7 +1023,7 @@ static void do_umount_iso(void)
10231023
}
10241024

10251025
char filename[MAX_PATH_LEN];
1026-
if(read_file(DEL_CACHED_ISO, filename, MAX_PATH_LEN, 0))
1026+
if(clean && read_file(DEL_CACHED_ISO, filename, MAX_PATH_LEN, 0))
10271027
{
10281028
cellFsUnlink(DEL_CACHED_ISO);
10291029
cellFsUnlink(filename);
@@ -1059,7 +1059,7 @@ static void do_umount(bool clean)
10591059
#ifndef LITE_EDITION
10601060
swap_file(PSP_EMU_PATH, "psp_emulator.self", "psp_emulator.self.dec_edat", "psp_emulator.self.original"); // restore original psp_emulator.self
10611061
#endif
1062-
do_umount_iso(); // unmount iso
1062+
do_umount_iso(clean); // unmount iso
10631063
#ifdef PS2_DISC
10641064
do_umount_ps2disc(false); // unmount ps2disc
10651065
#endif
@@ -1157,11 +1157,16 @@ static void cache_file_to_hdd(char *source, char *target, const char *basepath,
11571157
sprintf(target, "/dev_hdd0%s", basepath);
11581158
cellFsMkdir(target, DMODE);
11591159

1160-
cellFsUnlink(DEL_CACHED_ISO);
1161-
11621160
strcat(target, get_filename(source)); // add file name
11631161

1164-
if((copy_in_progress || fix_in_progress) == false && not_exists(target))
1162+
char filename[MAX_PATH_LEN];
1163+
if(read_file(DEL_CACHED_ISO, filename, MAX_PATH_LEN, 0) && !IS(target, filename))
1164+
{
1165+
cellFsUnlink(DEL_CACHED_ISO);
1166+
cellFsUnlink(filename);
1167+
}
1168+
1169+
if((copy_in_progress | fix_in_progress) == false && not_exists(target))
11651170
{
11661171
sprintf(msg, "%s %s\n"
11671172
"%s %s", STR_COPYING, source, STR_CPYDEST, basepath);
@@ -1178,15 +1183,19 @@ static void cache_file_to_hdd(char *source, char *target, const char *basepath,
11781183
cellFsUnlink(target);
11791184
show_msg_with_icon(ICON_EXCLAMATION, STR_CPYABORT);
11801185
}
1181-
else if(webman_config->deliso)
1186+
}
1187+
1188+
if(file_exists(target))
1189+
{
1190+
strcpy(source, target);
1191+
1192+
if(webman_config->deliso)
11821193
{
11831194
save_file(DEL_CACHED_ISO, target, SAVE_ALL);
11841195
}
11851196
}
1186-
1187-
if(file_exists(target)) strcpy(source, target);
11881197
}
1189-
1198+
11901199
do_umount(false); // umount + delete previous cached file
11911200
}
11921201

include/mount/ps2_disc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ static void do_umount_ps2disc(bool mount)
1212
static bool mount_ps2disc(char *path)
1313
{
1414
do_umount_ps2disc(true);
15-
do_umount_iso();
15+
do_umount_iso(true);
1616

1717
if(!isDir(path)) return false;
1818

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ static void do_umount(bool clean);
394394
static void mount_autoboot(void);
395395
static bool mount_game(const char *_path, u8 do_eject);
396396
#ifdef COBRA_ONLY
397-
static void do_umount_iso(void);
397+
static void do_umount_iso(bool clean);
398398
static void unload_vsh_gui(void);
399399
static void set_app_home(const char *game_path);
400400
static bool is_iso_0(const char *filename);

0 commit comments

Comments
 (0)