webif auto cronjob fails (auto-expire not working)

MadMart

New Member
I noticed that auto-expire hasn't worked for about a month and after digging around I eventually went to the CLI and looked at the cron entry, and found the auto script which deals with expire and other modules.

*/10 * * * * /mod/webif/lib/bin/auto >/dev/null 2>&1
Running this manually I found out why it's been failing:

./auto
Runtime Error: ./auto : 151 : Runtime Error : /mod/webif/lib/ts.class : 298 : error copying "/media/My Video/* * Soaps * */Emmerdale/Emmerdale_20140423_1858.hmt" to "/media/My Video/* * Soaps * */Emmerdale/Invalid_HMT_file,__media_My_Video_*_*_So.hmt" : file already exists
in procedure 'ts' called at file "/mod/webif/html/dedup/dedup", line 75
in procedure 'file' called at file "/mod/webif/lib/ts.class", line 298
in procedure 'scan' called at file "./auto", line 627
in procedure 'scan' called at file "./auto", line 568
in procedure 'scan' called at file "./auto", line 568
in procedure 'dedup' called at file "./auto", line 564
at file "./auto", line 151
Deleting the hmt file got it further, until it hit the next hmt!
humax# ./auto
Runtime Error: ./auto : 151 : Runtime Error: /mod/webif/lib/ts.class: 298 : error copying "/media/My Video/* * Soaps * */Coronation Street/Coronation Street_20140423_1930.hmt" to "/media/My Video/* * Soaps * */Coronation Street/Invalid_HMT_file,__media_My_Video_*_*_So.hmt" : file already exists
in procedure 'ts' called at file "/mod/webif/html/dedup/dedup", line 75
in procedure 'file' called at file "/mod/webif/lib/ts.class", line 298
in procedure 'scan' called at file "./auto", line 627
in procedure 'scan' called at file "./auto", line 568
in procedure 'scan' called at file "./auto", line 568
in procedure 'dedup' called at file "./auto", line 564
at file "./auto", line 151
I'm not sure where the Invalid files come from, if there is an auto clean up for them, and what is supposed to happen if there are multiple invalid files.
I'll have a look at the auto script in more detail when I get a chance, but I've never looked at jimsh before, so may take me a while to figure it out. I guess it's missing some code to cope with a pre-existing invalid file in a folder.
Anyway, perhaps one for the bug list to fix, and this might help someone else out in the meantime if you can't work out why automated tasks aren't running... ie try deleting any invalid files you can find.
 

prpr

Well-Known Member
Taking the * characters out of the folder name would seem to be a reasonable place to start.
 

hairy_mutley

Active Member
Lets face it, those *s were just never going to play nicely :eek:.
Definitely avoid *, in which case, also ?.
A purist might also say spaces, but we know that so many people do use them, that they are generally handled and without too much effort.
Scripting languages might get upset about $ as well?
 

Black Hole

May contain traces of nut
Characters which could cause a problem in a file name normally get replaced with underscores in the real file name - odd that asterisks get through.
 

MontysEvilTwin

Well-Known Member
I am getting out of my comfort zone here, but an asterisk is used as a wildcard in UNIX operating systems. The custom firmware uses BusyBox which makes UNIX tools available in Linux operating systems. Is this the root of the problem?
 

Black Hole

May contain traces of nut
That is the thesis, yes.

Robust system design is about guessing all the stupid things a user could do and making sure the system doesn't break if they are done. It looks like af123 never guessed somebody would use asterisks in a folder name and test what would happen if they did (and who can blame him?).
 
Top