Page 1 of 1

Patch to default to storage log rather than display an error

Posted: 26 Feb 2014, 00:32
by sli
In Misc.pm, at line 162, add readStorageLog after writeStorageLog.

Again, in Misc.pm around line 3157 or so, add:

Code: Select all

sub readStorageLog {
	my ($show_error_on_fail) = @_;
	my $f;
	my @storageLog;

	if (open($f, "<:utf8", $Settings::storage_log_file)) {
		@storageLog = <$f>;
		foreach (@storageLog) {
			print "$_";
		}
	} elsif ($show_error_on_fail) {
		error TF("Unable to read from %s\n", $Settings::storage_log_file);
	}
}
In Commands.pm, comment out or remove the error at line 4526 and insert this:

Code: Select all

readStorageLog(1);
Done. The output isn't as comprehensive as the standard storage command, but it'll do. Really wish you guys were using Git so I could just issue a pull request.