Skip to content

Commit 8ffc17a

Browse files
committed
Merge branch 'early-unstable' into early
2 parents b17fb74 + e303eb9 commit 8ffc17a

File tree

1 file changed

+33
-28
lines changed

1 file changed

+33
-28
lines changed

functions/EmuScripts/emuDeckRPCS3.ps1

+33-28
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,39 @@ function RPCS3_setEmulationFolder(){
3030

3131
}
3232
function RPCS3_renameFolders(){
33-
Write-Output "Renaming PS3 folders for ESDE compatibility..."
34-
35-
$basePath = "$romsPath/ps3"
36-
if (-not (Test-Path $basePath)) {
37-
Write-Output "The directory $basePath does not exist. Please verify the path."
38-
return
39-
}
40-
41-
$directories = Get-ChildItem -Path $basePath -Directory
42-
43-
foreach ($directory in $directories) {
44-
$name = $directory.Name
45-
46-
# Skip the "shortcuts" folder
47-
if ($name -ne "shortcuts") {
48-
49-
# If the folder name does not end with .ps3, add the extension
50-
if (-not $name.EndsWith(".ps3")) {
51-
$newName = $name + ".ps3"
52-
Rename-Item -Path $directory.FullName -NewName $newName
53-
Write-Output "Renamed folder '$name' to '$newName'."
54-
}
55-
# Avoid renaming "media" to itself
56-
elseif ($name -eq "media") {
57-
Write-Output "The folder 'media' does not need to be renamed."
58-
}
59-
}
60-
}
33+
Write-Output "Renaming PS3 folders for ESDE compatibility..."
34+
35+
$basePath = "$romsPath/ps3"
36+
if (-not (Test-Path $basePath)) {
37+
Write-Output "The directory $basePath does not exist. Please verify the path."
38+
return
39+
}
40+
41+
$directories = Get-ChildItem -Path $basePath -Directory
42+
43+
foreach ($directory in $directories) {
44+
$name = $directory.Name
45+
46+
# Skip the "shortcuts" folder
47+
if ($name -ne "shortcuts") {
48+
49+
if ($name -eq "media.ps3") {
50+
$newName = "media"
51+
Rename-Item -Path $directory.FullName -NewName $newName
52+
Write-Output "Fixed folder '$name' to '$newName'."
53+
}
54+
55+
# If the folder name does not end with .ps3, add the extension
56+
if ($name -eq "media") {
57+
Write-Output "The folder 'media' does not need to be renamed."
58+
}elseif (-not $name.EndsWith(".ps3")) {
59+
$newName = $name + ".ps3"
60+
Rename-Item -Path $directory.FullName -NewName $newName
61+
Write-Output "Renamed folder '$name' to '$newName'."
62+
}
63+
# Avoid renaming "media" to itself
64+
}
65+
}
6166
}
6267
function RPCS3_setResolution($resolution){
6368
switch ( $resolution )

0 commit comments

Comments
 (0)