From 13837971a7d2ea9d74b399d6c1adc7f809792b75 Mon Sep 17 00:00:00 2001 From: Durand D'souza Date: Tue, 20 Sep 2016 05:23:34 +0100 Subject: [PATCH] Update UiRequest.py Fixed a bug where a lack of a trailing slash in every url caused zeronet to fail to load the page, even if it existed. --- src/Ui/UiRequest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Ui/UiRequest.py b/src/Ui/UiRequest.py index 66d887fa..04e08bf2 100644 --- a/src/Ui/UiRequest.py +++ b/src/Ui/UiRequest.py @@ -351,6 +351,8 @@ class UiRequest(object): DebugMedia.merge(file_path) if os.path.isfile(file_path): # File exits return self.actionFile(file_path) + elif os.path.isdir(file_path): # If this is actually a folder, add "/" and redirect + return self.actionRedirect("./{0}/".format(path_parts["inner_path"].split("/")[-1])) else: # File not exits, try to download site = SiteManager.site_manager.need(address, all_file=False) result = site.needFile(path_parts["inner_path"], priority=5) # Wait until file downloads