$OpenBSD: patch-flyback_py,v 1.3 2008/07/07 16:24:16 jasper Exp $
--- flyback.py.orig	Thu Nov 15 07:22:16 2007
+++ flyback.py	Mon Jul  7 18:23:12 2008
@@ -21,7 +21,7 @@ import os, sys, traceback, math
 
 RUN_FROM_DIR = os.path.abspath(os.path.dirname(sys.argv[0])) + '/'
 VERSION = 'v0.4.0'
-GPL = open( RUN_FROM_DIR + 'GPL.txt', 'r' ).read()
+GPL = open( '!!PREFIX!!/share/flyback/' + 'GPL.txt', 'r' ).read()
 
 DEFAULT_EXCLUDES = [
     '/**/.thumbnails/',
@@ -243,7 +243,10 @@ class main_gui:
                 files.extend(not_dirs)
             for file in files:
                 full_file_name = os.path.join( focus_dir, file )
-                file_stats = os.stat(full_file_name)
+                try:
+                   file_stats = os.stat(full_file_name)
+                except os.error:
+                   pass
                 color = False
 #                print 'full_file_name', full_file_name
 #                print 'file_stats', file_stats
@@ -327,7 +330,7 @@ class main_gui:
     def __init__(self):
         
         gnome.init("programname", "version")
-        self.xml = gtk.glade.XML(RUN_FROM_DIR + 'viewer.glade')
+        self.xml = gtk.glade.XML('!!PREFIX!!' + '/share/flyback/' + 'viewer.glade')
         o = self
         self.backup = backup(o)
         
@@ -589,13 +592,13 @@ class prefs_gui:
     def install_crontab(self, c):
         existing_crons = []
         
-        stdin, stdout = os.popen4('crontab -l')
+        stdin, stdout = os.popen4('crontab -l | grep -v "DO NOT EDIT THIS FILE" | grep -v "/tmp/.* installed on" | grep -v "Cron version .* crontab.c"')
         for line in stdout:
             if line.startswith('no crontab for'): continue
             if line.endswith('#flyback\n'): continue
             existing_crons.append(line)
         if c:
-            existing_crons.append(c + ' python '+ os.getcwd() +'/flyback.py --backup #flyback\n')
+            existing_crons.append(c + ' !!MODPY_BIN!! '+ RUN_FROM_DIR +'/flyback.py --backup #flyback\n')
         stdin.close()
         stdout.close()
 
@@ -631,7 +634,7 @@ class prefs_gui:
         # init external_storage_location
         external_storage_location = client.get_string("/apps/flyback/external_storage_location")
         if not external_storage_location:
-            external_storage_location = '/external_storage_location'
+            external_storage_location = '/var/tmp'
         self.xml.get_widget('external_storage_location').set_current_folder( external_storage_location )
 
         self.xml.get_widget('prefs_dialog').show()
