From: Caleb E. <ca...@bk...> - 2001-02-14 22:30:31
|
First let me say THANK YOU for the best web-based photo album I've come across and I've tried just about all of them. ids rocks. One curious thing I've noticed is that the code look a LOT like the "myphotoalbum" on www.mikespice.com. Does ids originate here or were they both branched from another project? Now on to the code. I've set up my ids directory such that "albums" is a symlink to a directory on another filesystem. This caused problems when trying to add comments to directories and files which turned out to be due to the "rename" call in replace_file() trying to cross a device boundary. The patch below changes the name of the temporary file to be in the same dir as the file which will be created, thus eliminating this problem. --- ids-0.6/idsShared.pm Tue Feb 13 18:42:01 2001 +++ /var/www/photo/idsShared.pm Wed Feb 14 16:08:32 2001 @@ -157,7 +157,7 @@ # try new temporary filenames until we get one that didn't already # exist; the check should be unnecessary, but you can't be too careful - do {$name = "./$$-".int rand 999} + do {$name = "$File.$$-".int rand 999} until sysopen(FH, $name, O_RDWR|O_CREAT|O_EXCL); # install atexit-style handler so that when we exit or die, -- cae at bklyn dot org | Caleb Epstein | bklyn . org | Brooklyn Dust Bunny Mfg. |