This question is answered.


Permlink Replies: 16 - Pages: 2 [ Previous | 1 2 ] - Last Post: 29-Nov-2017 15:19 Last Post By: AndreWolff Threads: [ Previous | Next ]
davidekholm

Posts: 21,839
Registered: 18-Oct-2002
Re: Add a function to suppress the generation of a theme image in index.htt
Posted: 29-Nov-2017 13:32   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
I tried to delete the theme image in PostDir.bsh if it is not used with this code:
if (deleteThemeImage) (
	File x = new File(outputDirectory + "/folderimage.jpg");
	try {
		x.delete();
	}
}

Change these things:
  • Change the ( to a { on the "if" row
  • Change new File(outputDirectory + "/folderimage.jpg"); to new File(outputDirectory, "folderimage.jpg");
  • Delete the not-doing-anything- "try {" and "}" clause.
AndreWolff

Posts: 2,546
Registered: 14-Dec-2007
Re: Add a function to suppress the generation of a theme image in index.htt
Posted: 29-Nov-2017 15:08   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Thanks David, you see my eyes are getting bad!

The delete function works now too, no more orphan theme images!

The corrected Minimal_ThemeCore.jaskin is again attached.

Edit:
Although
new File(outputDirectory + "/folderimage.jpg");
did work, it is now replaced by
new File(outputDirectory, "folderimage.jpg");
as advised.

Edited by: AndreWolff on 29-Nov-2017 15:18

Point your RSS reader here for a feed of the latest messages in all forums