How to name images

Sep 16, 2010 at 12:17 PM

It says in Cradiator.exe.config that I should name my picture in images/ to the same name as my ccnet user, but my ccnet username contains a character that is not valid in a filename (domain\username).
I tried with domainusername.jpg but that didnt work.

Sep 16, 2010 at 1:30 PM
Edited Sep 16, 2010 at 1:33 PM

Hi Lazydev,

Yes, your username will have to be a valid filename - I didn't really consider that a ccnet username could have a slash character '\'

I was thinking of a fix for it just now, but then I can't help wondering - why would you create a username with a '\' in it? ;-) 

I'm just checking if there's a solid reason to keep such a username (it would seem to just create unnecessary noise), otherwise, I am just as willing to leave the code as is and require usernames to not have slashes for images to work.

Sep 17, 2010 at 7:24 PM

We validate via a windows domain, thats why the username is like domain\username.

Sep 18, 2010 at 4:21 AM
I see, like a single sign-on setup or something. I think your guess is the right fix (where "right" is probably the easiest to guess) we'll make it so the slash is just ignored
Sep 18, 2010 at 5:47 AM
Edited Sep 21, 2010 at 3:48 AM

Actually LazyDev,

I just happened to fix this today - it's on the master branch on Cradiator GitHub

The fix caters for any invalid character, so bob?*<>smith - will just look for bobsmith.jpg

Sep 20, 2010 at 6:57 AM


Sep 20, 2010 at 11:55 PM
Edited Sep 21, 2010 at 3:46 AM

BTW if in any doubt, the name of the file searched for is printed in the log (cradiator.log) - in log4net DEBUG mode

... Breaker image='c:\cradiator\images\breakername.jpg'

For Debug logging change INFO below (in app.config) to DEBUG

  <level value="INFO"/>
  <appender-ref ref="RollingLogFileAppender"/>