Skip to content

Commit b52061d

Browse files
committed
Removed "normalized" from savegame title matcher +savegame upload will be canceled, if no savegame data is in the upload folder + added messages for manual savegame upload
1 parent bcade75 commit b52061d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

gamevault/Helper/Integrations/SaveGameHelper.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ internal async Task BackupSaveGame(int gameId)
155155
string title = await SearchForLudusaviGameTitle(gameMetadataTitle);
156156
string tempFolder = await CreateBackup(title);
157157
string archive = Path.Combine(tempFolder, "backup.zip");
158+
if (Directory.GetFiles(tempFolder, "mapping.yaml", SearchOption.AllDirectories).Length == 0)
159+
{
160+
Directory.Delete(tempFolder, true);
161+
return;
162+
}
158163
await zipHelper.PackArchive(tempFolder, archive);
159164

160165
bool success = await UploadSavegame(archive, gameId);
@@ -177,7 +182,7 @@ internal async Task<string> SearchForLudusaviGameTitle(string title)
177182
Process process = new Process();
178183
ProcessShepherd.Instance.AddProcess(process);
179184
process.StartInfo = CreateProcessHeader();
180-
process.StartInfo.Arguments = $"find \"{title}\" --normalized --fuzzy --api";
185+
process.StartInfo.Arguments = $"find \"{title}\" --fuzzy --api";//--normalized
181186
process.EnableRaisingEvents = true;
182187

183188
List<string> output = new List<string>();

gamevault/UserControls/GameViewUserControl.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,10 @@ private async void ManualBackupSaveGame_Click(object sender, RoutedEventArgs e)
383383
MainWindowViewModel.Instance.Settings.SetTabIndex(4);
384384
return;
385385
}
386+
MainWindowViewModel.Instance.AppBarText = "Uploading Savegame to the Server...";
386387
((FrameworkElement)sender).IsEnabled = false;
387388
await SaveGameHelper.Instance.BackupSaveGame(ViewModel!.Game!.ID);
389+
MainWindowViewModel.Instance.AppBarText = "Successfully synchronized the cloud saves";
388390
}
389391
catch
390392
{

0 commit comments

Comments
 (0)