Opened 15 years ago

Closed 14 years ago

Last modified 6 years ago

#7759 closed feature request

exit status with --list-saves always 0

Reported by: SF/drantin Owned by: sev-
Priority: normal Component: --Other--
Version: Keywords:
Cc: Game:

Description

When querying scummvm for a list of game saves from the command line, the exit status is set to 0, even if the gameid does not exist, or is associated with an engine that does not support game save querying, or when the gameid just has no saves. (In the latter case an empty list is returned)

~ $ scummvm --list-saves=t7g Saves for target 't7g': Slot Description
---- ------------------------------------------------------ 1 this.is.a.sav 2 stupid.crypt ~ $ echo $? 0 ~ $ scummvm --list-saves=tentacle Saves for target 'tentacle': Slot Description
---- ------------------------------------------------------ ~ $ echo $? 0 ~ $ scummvm --list-saves=nosuchgameid Could not find any plugin to handle gameid 'nosuchgameid' (target 'nosuchgameid')! ~ $ echo $? 0 ~ $ scummvm --list-saves=rtz Saves for target 'rtz': Slot Description
---- ------------------------------------------------------ ~ $ echo $? 0

imho, each of these instances (that do not result in the listing of saved games) should return a non-zero exit status, and the instance of an engine that doesn't support querying should also return some sort of error, rather than an empty list.

(I have no saved games for 'tentacle')

Ticket imported from: #2988017. Ticket imported from: feature-requests/575.

Change History (6)

comment:1 by fingolfin, 15 years ago

This is not a bug, things work "as designed" (I don't claim the design is good, mind you). Moving to feature requests.

comment:2 by fingolfin, 15 years ago

Component: --Unset--

comment:3 by lordhoto, 15 years ago

I added a slight message to the user now, in case he tries to list save states of a target, which does not support that. (r48923 of trunk)

comment:4 by sev-, 14 years ago

Implemented in SVN.

comment:5 by sev-, 14 years ago

Owner: set to sev-
Status: newclosed

comment:6 by digitall, 6 years ago

Component: --Other--
Note: See TracTickets for help on using tickets.