Closed GoogleCodeExporter closed 9 years ago
It appears that /tmp is hardcoded virtually EVERYWHERE!
On the other hand it looks like it is only in Perl scripts. Replacing it with
a variable would be a good start to
reading a configuration or environment variable.
Why couldn't it be the same place as the final target folder?
Original comment by edbol...@gmail.com
on 15 Dec 2008 at 12:06
I take it that originally these were stored in the final target folder, but
that caused problems with FileVault. See
Issue 9 -- http://code.google.com/p/itivo/issues/detail?id=9&can=1
Original comment by snov...@gmail.com
on 15 Dec 2008 at 12:11
Interesting. In this case, the fix perhaps should be an option of WHERE the
temp files should go. The solution
for FileVault users appears to "throw out the baby with the bathwater".
I'm not sure if I can scan the subversion tree for the changes needed to "undo"
this "fix", but I will see if can be
done.
Original comment by edbol...@gmail.com
on 15 Dec 2008 at 12:24
Yeah.. sadly /tmp/ is hardcoded all over the place.. did I mention the codebase
is
UGLY? It was hardcoded to be in the homedir before.. I just moved it to /tmp..
Anyways, you don't want to undo the change (as there's new dependencies for
metadata and whatnot). However, having an environment variable or .plist config
value that's hidden for most users but available for those who need it would
work
(does apple/cocoa have some global tempdir setting?).
Another option (probably the easiest for me) is to use a subdir in /tmp/... say
/tmp/iTiVo-<user>/
and put all the tmp files in there.
Then all you have to do is make /tmp/iTiVo-<user> a symlink into wherever you want
your tempfiles to be...
Anyways.. marking as enhancement, and hopefully I'll get around to hacking that in
soon... Damn this code needs a complete re-write in something OTHER than
applescript...
Original comment by yoav.yer...@gmail.com
on 15 Dec 2008 at 2:50
As an experiment (which required my actually downloading the latest developer
tools because they were never
on my laptop! and finding I could actually install them on the external drive,
mostly), I did search and replace
for all of the /tmp in the Perl scripts and replaced with $TmpFolder. I then
put in some code to set it to
"/tmp" if there was no environment variable (which there isn't ) named
TmpFolder. Perhaps better would have
been to make that an arg to the scripts, which I think I'll do.
I changed the iTivo.applescript also so that everywhere it used /tmp, it
instead used " & TmpFolder & "
I haven't figured out how or where to set TmpFolder to something - it is just
/tmp right now!
I built and ran and it worked (after removing the elgato.applescript, which
fails since there is no turbo.264 or
whatever it wanted on my system).
So now that I have a duplicate of the original functions (which I managed to
test with a small show), I'll change
it to /tmp/iTiVo-bolson (hard coded still) and make a link as you suggested.
Original comment by edbol...@gmail.com
on 15 Dec 2008 at 3:48
Ok I made the lazy change and checked it in..
If you want to have the tmp files go somewhere other than your main folder, before
you ever start iTiVo, open up a terminal and do (this will put it in the root
volume
of your external disk):
rm -rf /tmp/iTiVo*
mkdir /Volumes/<externaldiskname>/iTiVo
ln -s /Volumes/<externaldiskname>/iTiVo /tmp/iTiVo-<username>
(replace the <> with correct values). Reply here if that didnt make sense, but
marking as 'fixed'...
Original comment by yoav.yer...@gmail.com
on 15 Dec 2008 at 3:50
gah well you're welcome to keep a sepeate source tree (and if any changes you
make
are nice and global-friendly.. send em back!)..
but 1.7b3 actually uses /tmp/iTiVo-<username> so it *should* fix the problem
without needing to keep a seperate source tree..
Original comment by yoav.yer...@gmail.com
on 15 Dec 2008 at 4:36
Hey, no problem. I didn't expect a fix or change so quickly, and it was fun to
figure out a solution. I'll just
move my code and download the latest version.
Thanks for looking at it so quickly.
Original comment by edbol...@gmail.com
on 15 Dec 2008 at 4:40
Original issue reported on code.google.com by
edbol...@gmail.com
on 14 Dec 2008 at 11:59