View Full Version : "Could not create temp file" FileBackend.pm

2007-12-11, 15:49
I am having trouble with SlimServer 6.5.1 running on a nslu2 box (openslug, perl-5.8.8). The server starts up fine but when I try to connect to the web interface the connection is terminated and the following is displayed in the log-file:

"Error in tempfile() using /media/usbhdd/tmp/FileCache/4/2/9/XXXXXXXXXX: Could not create temp file /media/usbhdd/tmp/FileCache/4/2/9/: Is a directory at /opt/share/ss65/lib/Cache/FileBackend.pm line 569"

I have set the cache directory to /media/usbhdd/tmp which is owned by the slimserver user.
Other than this I see no obvious errors in the logs. Any ideas or debug tips?

2007-12-19, 11:24
I tried an older version of SlimServer (v. 6.3) and got the same messages about problems creating temp directories.

I changed (around line 280) in Template/Document.PM to use fileparse instead of basename since basename was omitting the trailing slash.

my ($fname,$fpath) = File::Basename::fileparse($file);
($fh, $tmpfile) = File::Temp::tempfile(
DIR => $fpath

Now it seems to work, someone interested in the bug process might be interested in this, even though it is an older version of SlimServer.