Opened 16 years ago
Closed 15 years ago
Last modified 15 years ago
#5480 closed patch (worksforme)
Patch for ipodexport.pl to use Storage Groups
Reported by: | Owned by: | Rob Smith | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | contrib | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
The storagegroup code in ipodexport.pl attempts to grab the storagegroup path without first initializing the value of $basename. The following patch will grab the correct $basename value from the 'recorded' table before attempting to find the file path from storagegroup.
36c36 < $usage = "\nHow to use dvbradioexport.pl : \n" --- > $usage = "\nHow to use ipodexport.pl : \n" 122a123,128 > > $query = "SELECT basename FROM recorded WHERE chanid=$chanid AND starttime=$starttime"; > $query_handle = $connect->prepare($query); > $query_handle->execute() || die "Unable to query recorded table"; > my ($basename) = $query_handle->fetchrow_array; >
Change History (3)
comment:1 Changed 16 years ago by
Owner: | changed from Isaac Richards to Rob Smith |
---|---|
Status: | new → accepted |
comment:2 Changed 15 years ago by
Resolution: | → worksforme |
---|---|
Status: | accepted → closed |
comment:3 Changed 15 years ago by
Looking at the current trunk copy of ipodexport.pl, I don't see where this error has been fixed.
$basename is only referenced once in the file (line 124) and as such is uninitialized when passed to $storagegroup->FindRecordingDir?. The FindRecordingDir? routine in StorageGroup?.pm will be unable to find the file (since the name passed to it is an unitialized value) and will return the last storage group directory that it checked. This will in fact work if you only have a single storage location defined, but will fail to find the file if there are multiple directories or storage groups defined.
File was updated previously.
Thanks anyway!