From f576527986692e82a2fd154b821685c07900c5d9 Mon Sep 17 00:00:00 2001 From: HelloZeroNet Date: Tue, 21 Apr 2015 00:35:34 +0200 Subject: [PATCH] rev116, Fix websocket error when writing invalid files on not-owned sites, Fix for stucked notification icon after shutdown --- README.md | 1 + plugins/Trayicon/lib/notificationicon.py | 2 +- src/Config.py | 2 +- src/Content/ContentManager.py | 4 +++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c3cef26b..695ea045 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Decentralized websites using Bitcoin crypto and the BitTorrent network * Tor network support * Automatic, uPnP port opening * Plugin for multiuser (openproxy) support + * Works with any browser/OS ## How does it work? diff --git a/plugins/Trayicon/lib/notificationicon.py b/plugins/Trayicon/lib/notificationicon.py index f6a2b44d..b6fd25dc 100644 --- a/plugins/Trayicon/lib/notificationicon.py +++ b/plugins/Trayicon/lib/notificationicon.py @@ -653,7 +653,7 @@ class NotificationIcon(object): print "Icon thread stopped, removing icon..." #KillTimer(self._hwnd, self._timerid) - Shell_NotifyIcon(NIM_DELETE, ctypes.pointer(iconinfo)) + Shell_NotifyIcon(NIM_DELETE, ctypes.cast(ctypes.pointer(iconinfo), ctypes.POINTER(NOTIFYICONDATA))) ctypes.windll.user32.DestroyWindow(self._hwnd) ctypes.windll.user32.DestroyIcon(self._hicon) diff --git a/src/Config.py b/src/Config.py index 43bade8a..77f2e33b 100644 --- a/src/Config.py +++ b/src/Config.py @@ -4,7 +4,7 @@ import ConfigParser class Config(object): def __init__(self): self.version = "0.2.9" - self.rev = 115 + self.rev = 116 self.parser = self.createArguments() argv = sys.argv[:] # Copy command line arguments argv = self.parseConfig(argv) # Add arguments from config file diff --git a/src/Content/ContentManager.py b/src/Content/ContentManager.py index 34157820..9b20e741 100644 --- a/src/Content/ContentManager.py +++ b/src/Content/ContentManager.py @@ -111,7 +111,9 @@ class ContentManager: def getIncludeInfo(self, inner_path): if not inner_path.endswith("content.json"): # Find the files content.json first - inner_path = self.getFileInfo(inner_path)["content_inner_path"] + file_info = self.getFileInfo(inner_path) + if not file_info: return False # File not found + inner_path = file_info["content_inner_path"] dirs = inner_path.split("/") # Parent dirs of content.json inner_path_parts = [dirs.pop()] # Filename relative to content.json inner_path_parts.insert(0, dirs.pop()) # Dont check in self dir