superg / redumper

Low level CD dumper utility
GNU General Public License v3.0
187 stars 17 forks source link

[Bug] error: dump already exists #98

Closed maxz closed 8 months ago

maxz commented 8 months ago

Redumper complains about an already existing dump when specifying the dump argument although there were no files at all before starting redumper.

With --overwrite it obviously works. But I would expect it to work without overwrite if no files with conflicting names exist apart from anything that redumper itself creates.

Log without explicit name or path:

redumper v2023.11.22 build_262 [Nov 22 2023, 19:57:04]

arguments: dump cd --drive-type=PLEXTOR --drive-sector-order=DATA_C2_SUB --drive-pregap-start=-75 --drive-read-method=D8 --retries=100 --verbose

drive path: /dev/sg4
drive: PLEXTOR - CD-R PX-W4012A (revision level: 1.07, vendor specific: 03/22/06 09:00)
drive configuration: PLEXTOR (read offset: +98, C2 shift: 294, pre-gap start: -75, read method: D8, sector order: DATA_C2_SUB)
drive read speed: <optimal>

current profile: CD-ROM

image path: .
image name: dump_231126_144456_sg4

*** DUMP

disc TOC:
  track 1 {  data }
    index 01 { LBA:      0, MSF: 00:02:00 }
  track A {  data }
    index 01 { LBA: 336925, MSF: 74:54:25 }

PLEXTOR: reading lead-in (retry: 1)
PLEXTOR: lead-in found (session: 1, sectors: 755)
PLEXTOR: reading lead-in (retry: 2)
PLEXTOR: lead-in found (session: 1, sectors: 95)
PLEXTOR: storing lead-in (session: 1, verified: yes)

media errors: 
  SCSI: 0
  C2: 0
  Q: 59

*** DUMP (time check: 577s)

error: dump already exists (image name: dump_231126_144456_sg4)

ls . after the error:

dump_231126_144456_sg4.fulltoc  dump_231126_144456_sg4.scram  dump_231126_144456_sg4.subcode
dump_231126_144456_sg4.log      dump_231126_144456_sg4.state  dump_231126_144456_sg4.toc

Log with name and path:

redumper v2023.11.22 build_262 [Nov 22 2023, 19:57:04]

arguments: dump cd --drive-type=PLEXTOR --drive-sector-order=DATA_C2_SUB --drive-pregap-start=-75 --drive-read-method=D8 --retries=100 --verbose --image-path=BUG_IMAGE_PATH --image-name=BUG_IMAGE_NAME

drive path: /dev/sg4
drive: PLEXTOR - CD-R PX-W4012A (revision level: 1.07, vendor specific: 03/22/06 09:00)
drive configuration: PLEXTOR (read offset: +98, C2 shift: 294, pre-gap start: -75, read method: D8, sector order: DATA_C2_SUB)
drive read speed: <optimal>

current profile: CD-ROM

image path: BUG_IMAGE_PATH
image name: BUG_IMAGE_NAME

*** DUMP

disc TOC:
  track 1 {  data }
    index 01 { LBA:      0, MSF: 00:02:00 }
  track A {  data }
    index 01 { LBA: 336925, MSF: 74:54:25 }

PLEXTOR: reading lead-in (retry: 1)
PLEXTOR: lead-in found (session: 1, sectors: 1045)
PLEXTOR: reading lead-in (retry: 2)
PLEXTOR: lead-in session not identified
PLEXTOR: reading lead-in (retry: 3)
PLEXTOR: lead-in found (session: 1, sectors: 413)
PLEXTOR: storing lead-in (session: 1, verified: yes)

media errors: 
  SCSI: 0
  C2: 0
  Q: 62

*** DUMP (time check: 648s)

error: dump already exists (image name: BUG_IMAGE_NAME)

ls BUG_IMAGE_PATH/ after the error:

BUG_IMAGE_NAME.fulltoc  BUG_IMAGE_NAME.scram  BUG_IMAGE_NAME.subcode
BUG_IMAGE_NAME.log      BUG_IMAGE_NAME.state  BUG_IMAGE_NAME.toc
superg commented 8 months ago

You've ran it as redumper dump cd ... both "dump" and "cd" are commands. "dump" means just dump cd (but don't split to multitrack) and "cd" command is actually a meta command that executes "dump" "protection" "refine" "split" "info" So what was executed in the end was: "dump" "dump" "protection" "refine" "split" "info"

Second dump from here will fail as previous dump has already created files based on a timestamp which remains the same throughout the execution.

You probably want just to dump a cd so for that you either execute: redumper cd ... or just redumper ... as the default mode is cd.

maxz commented 8 months ago

Ah. I've run successful dumps before. But I began automating my redumper use and wanted to specify the operation explicitly as far as it makes sense. I though CD itself was on another level as dump.

Thanks for the clarification on the commands.

superg commented 8 months ago

I see, if you're building something more advanced, you can use all the underlying commands directly. Just want to mention that depending on a disc type, the command list will be different, example: https://github.com/superg/redumper/blob/main/redumper.ixx#L178