Skip to content

Commit 3ee49a7

Browse files
committed
SteamScreenshots: Delete appdetails file if unsuccessful to trigger redownload #550
1 parent ff9268f commit 3ee49a7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

source/Generic/SteamScreenshots/ScreenshotsControl/SteamScreenshotsControl.xaml.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,18 @@ private async Task SetScreenshots(string gameDataPath, bool downloadScreenshots,
254254
}
255255

256256
var response = parsedData[parsedData.Keys.First()];
257-
if (!response.success || response.data is null)
257+
if (!response.success)
258258
{
259+
// #550 Due to unknown circumstances, the response can return success:false
260+
// despite data being available but a redownload fixes it
259261
_logger.Warn($"Data in {gameDataPath} is not successful");
262+
FileSystem.DeleteFile(gameDataPath);
263+
return;
264+
}
265+
266+
if (response.data is null)
267+
{
268+
_logger.Warn($"Data in {gameDataPath} is null");
260269
return;
261270
}
262271

0 commit comments

Comments
 (0)