@@ -1,14 +1,44 @@
1−diff -rupN a/blink/resources.py b/blink/resources.py
2−--- a/blink/resources.py 2015-03-17 03:24:06.000000000 -0600
3−+++ b/blink/resources.py 2015-04-07 22:52:06.101096413 -0600
4−@@ -60,14 +60,7 @@ class Resources(object):
1+--- blink-2.0.0/blink/resources.py 2016-03-09 14:39:07.000000000 +0100
2++++ blink-2.0.0/blink/resources-patched.py 2016-03-12 21:34:14.965476623 +0100
3+@@ -1,7 +1,10 @@
4++# Copyright (C) 2010-2013 AG Projects. See LICENSE for details.
5++#
6+
7+ """Provide access to Blink's resources"""
8+
9+-import __main__
10++__all__ = ['ApplicationData', 'Resources', 'IconManager']
11++
12+ import imghdr
13+ import os
14+ import platform
15+@@ -19,14 +22,10 @@
16+ from blink.util import run_in_gui_thread
17+
18+
19+-__all__ = ['ApplicationData', 'Resources', 'IconManager']
20+-
21+-
22+ class DirectoryContextManager(unicode):
23+ def __enter__(self):
24+ self.directory = os.getcwdu()
25+ os.chdir(self)
26+-
27+ def __exit__(self, type, value, traceback):
28+ os.chdir(self.directory)
29+
30+@@ -61,18 +60,7 @@
531 @classproperty
632 def directory(cls):
733 if cls._cached_directory is None:
8−- if sys.path[0] == '':
9−- application_directory = os.path.realpath('') # executed in interactive interpreter
34+- try:
35+- binary_directory = os.path.dirname(os.path.realpath(__main__.__file__))
36+- except AttributeError:
37+- if hasattr(sys, 'frozen'):
38+- application_directory = os.path.dirname(os.path.realpath(sys.executable))
39+- else:
40+- application_directory = os.path.realpath('') # executed in interactive interpreter
1041- else:
11−- binary_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
1242- if os.path.basename(binary_directory) == 'bin':
1343- application_directory = os.path.dirname(binary_directory)
1444- else:
@@ -17,4 +47,3 @@ diff -rupN a/blink/resources.py b/blink/resources.py
1747 if os.path.exists(os.path.join(application_directory, 'resources', 'blink.ui')):
1848 cls._cached_directory = os.path.join(application_directory, 'resources').decode(sys.getfilesystemencoding())
1949 else:
20−Binary files a/blink/.resources.py.swp and b/blink/.resources.py.swp differ