By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 2665

Summary: Knights littering my home directory with files
Product: TDE Reporter: Kristopher <gamrat.kristopher>
Component: tdegamesAssignee: Michele Calgaro <michele.calgaro>
Status: RESOLVED FIXED    
Severity: normal CC: bugwatch, gamrat.kristopher, michele.calgaro, slavek.banko
Priority: P5    
Version: R14.0.1 [Trinity]   
Hardware: Other   
OS: Linux   
See Also: http://bugs.pearsoncomputing.net/show_bug.cgi?id=2585
http://bugs.pearsoncomputing.net/show_bug.cgi?id=2285
Compiler Version: TDE Version String:
Application Version: Application Name:
Bug Depends on:    
Bug Blocks: 2575    
Attachments: Screenshot of the bug
/home/piki/.trinity/share/config/knightsrc
patch

Description Kristopher 2016-06-24 09:20:13 CDT
Created attachment 2673 [details]
Screenshot of the bug

Each time I use knights, it adds both a "game.###" and a "log.###" file to my home directory. I frequently find myself deleting them because they clutter up my home directory and get in the way.
Comment 1 Michele Calgaro 2016-08-12 05:15:29 CDT
Hi Kristoper,
I am trying to replicate this problem on my system, but so far without any luck.
1) What settings are you using for knights?
2) Do you have any local chess engine installed on your computer?
Thanks
Comment 2 Kristopher 2016-08-14 13:34:12 CDT
Created attachment 2680 [details]
/home/piki/.trinity/share/config/knightsrc
Comment 3 Kristopher 2016-08-14 13:35:36 CDT
(In reply to Michele Calgaro from comment #1)
<snip>
> 1) What settings are you using for knights?

I attached my config file for Knights.

> 2) Do you have any local chess engine installed on your computer?

Erm... Knights won't let me play without one. Is that supposed to be possible?
Comment 4 Michele Calgaro 2016-08-15 07:54:28 CDT
> Erm... Knights won't let me play without one. Is that supposed to be possible?
Human against human should be I think. I am just wondering whether those files are created by Knights or by the chess engine, that's the reason of my question.
I will check with your config and let you know.
Comment 5 Michele Calgaro 2016-08-15 09:20:33 CDT
Kris,
I am able to get the game.### and log.### files created in my home folder without using knight, to be precise using xboard and gnuchess or crafty as engine. The contents of the game.### and log.### files is different depending on the engine used, you can probably find this out on your system as well if you try to play against different engines.
I actually just run a quick google search about it and found that this is a known thing. For example you can disable logging in crafty as explained here:
http://askubuntu.com/questions/217928/how-can-i-change-the-settings-in-crafty-chess-engine

So IMO this is not a knight related bug at all (those files are just the output of the chess engine in use) and so propose to close the bug as "not our problem".
What is your opinion?
Comment 6 Michele Calgaro 2016-08-20 07:11:15 CDT
Kris,
as explained in comment 5 this bug does not seem to be related to Knights at all, but instead to the different chess engine in use.
I am closing the bug as hinted in the same comment. If you think this is incorrect, please let us know.
Comment 7 Kristopher 2016-08-20 08:45:41 CDT
If you want to ask for input before closing a bug at a time when the bugtracker is laggy and slow to load, I suggest waiting a bit longer instead of hastily closing the bug without input. Some of us do not have the time or patience to constantly click refresh on a timed-out website for minutes or hours at a time.

As per the link you provided, crafty provides parameters to turn off logging, and the person that mentioned that also suggested creating a script to move log files after crafty exits. Since crafty is being run through Knights and would not otherwise create log files, I suggest making use of one of those two options (possibly both, with a setting available to the user).

I would also like to point out this happens with the gnuchess engine as well, so it's not limited to crafty. In fact, gnuchess is the engien I normally use.

I am marking this as reponed since there is clearly a possible resolution that can be implemented within Knights itself: make use of the paremeters provided by the chess engine, or move the logs to a reasonable place (e.g. ~/logs/chess/).
Comment 8 Michele Calgaro 2016-08-20 09:22:06 CDT
Hi Kris,
I didn't mean to be rude. I consulted with Slavek and we both felt it was right to close the bug since we hadn't heard anything else from the last comment.

It's ok to reopen the bug, we will treat this as an ehnancement request to provide a user option to delete those files when exiting Knight.
Comment 9 Michele Calgaro 2016-09-29 09:34:36 CDT
Created attachment 2712 [details]
patch

I have prepared a patch which adds a user option to allow deleting chess engine log files on exit. Only files named game.### and log.### in the user home folder will be deleted.

Since this is a new feature, it should in theory be added to R14.1, not R14.0.
Slavek, what is your opinion?
Comment 10 Michele Calgaro 2016-09-30 07:35:42 CDT
After discussing with Slavek, we decided to add this also to R14.0.

Pushed in commit febf3bb (R14.1) and 78cddf8 (R14.0).