From 45ee57fd19d574739d9f92272ba2987f7ebf86e5 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 8 Jul 2016 20:51:28 +0200 Subject: Fix exception when uploading 0-byte file This could be triggered by uploading /proc/cpuinfo The code actually replaces an object with a string and breaks later access to object variables. Signed-off-by: Florian Pritz --- fb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fb.py') diff --git a/fb.py b/fb.py index 7497ee2..44b4461 100755 --- a/fb.py +++ b/fb.py @@ -603,7 +603,7 @@ class FBClient: return if os.stat(file.path)[6] == 0: - file = self.create_temp_copy(file.path) + file.path = self.create_temp_copy(file.path) if os.path.isdir(file.path): file.path = self.create_tarball(file.path) -- cgit v1.2.3-24-g4f1b