Skip to content

Commit c21d086

Browse files
committed
fix media.ps3
1 parent 00deb39 commit c21d086

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

functions/EmuScripts/emuDeckRPCS3.ps1

+27-28
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,33 @@ 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 the folder name does not end with .ps3, add the extension
50+
if ($name -eq "media") {
51+
Write-Output "The folder 'media' does not need to be renamed."
52+
}elseif (-not $name.EndsWith(".ps3")) {
53+
$newName = $name + ".ps3"
54+
Rename-Item -Path $directory.FullName -NewName $newName
55+
Write-Output "Renamed folder '$name' to '$newName'."
56+
}
57+
# Avoid renaming "media" to itself
58+
}
59+
}
6160
}
6261
function RPCS3_setResolution($resolution){
6362
switch ( $resolution )

0 commit comments

Comments
 (0)