Skip to content

Commit

Permalink
token fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dragoonDorise committed Sep 13, 2024
1 parent 1c484ea commit 12a1e51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions functions/JSONtoPS1.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function setSettinginFile($keySetting){

function storePatreonToken($token){
. "$env:USERPROFILE\EmuDeck\settings.ps1" -ErrorAction SilentlyContinue
mkdir "$savesPath" -ErrorAction SilentlyContinue
$token | Set-Content -Path "$savesPath/.token" -Encoding UTF8
if (Test-Path "$cloud_sync_bin") {
& $cloud_sync_bin --progress copyto --fast-list --checkers=50 --transfers=50 --low-level-retries 1 --retries 1 "$savesPath/.token" "$cloud_sync_provider`:Emudeck\saves\.token"
Expand Down
5 changes: 3 additions & 2 deletions functions/helperFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -856,11 +856,11 @@ function createSaveLink($simLinkPath, $emuSavePath){
$originalFolderName = Split-Path $simLinkPath -Leaf
$newFolderName = Split-Path $emuSavePath -Leaf
$emuSaveParent = Split-Path $emuSavePath -Parent

rmdir "$emuSavePath" -ErrorAction SilentlyContinue
Move-Item -Path "$simLinkPath" -Destination $emuSaveParent -Force
Rename-Item -Path "$emuSaveParent\$originalFolderName" -NewName $newFolderName -Force

#Copy-Item -Path "$simLinkPath\*" -Destination $emuSavePath -Recurse -Force

if ($?) {
Expand Down Expand Up @@ -1301,6 +1301,7 @@ function isLatestVersionGH($emuName){


function storePatreonToken($token){
mkdir "$savesPath" -ErrorAction SilentlyContinue
$token | Set-Content -Path "$savesPath/.token" -Encoding UTF8
if (Test-Path "$cloud_sync_bin") {
& $cloud_sync_bin --progress copyto --fast-list --checkers=50 --transfers=50 --low-level-retries 1 --retries 1 "$savesPath/.token" "$cloud_sync_provider`:Emudeck\saves\.token"
Expand Down

0 comments on commit 12a1e51

Please sign in to comment.