From 0c76055222adf10b9d4cd81aae02afeb7a53a585 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Tue, 9 Jun 2020 23:31:51 +0200 Subject: [PATCH] turned compression off (not working) and tweaked some values trying to make file access more efficient --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index afddfba..6c1edab 100644 --- a/main.py +++ b/main.py @@ -298,7 +298,7 @@ class IotaFS(): self.putFile(self, file, new) class IotaFS_Fuse(LoggingMixIn, Operations): - def __init__(self, token, fileCompression=True): + def __init__(self, token, fileCompression=False): self.fs = IotaFS(token, fileCompression=fileCompression) def getSubtree(self, path): @@ -367,7 +367,8 @@ class IotaFS_Fuse(LoggingMixIn, Operations): st['st_mtime'] = 0 #last modified time in seconds st['st_ctime'] = 0 # very old file # TODO: Actuall real value - block_size = 512 + # I think, when I put it like this, we executes copies as one write and not multiple (which would be stupid with my implementation) + block_size = 1024*1024*1024 st['st_blocks'] = (int) ((st['st_size'] + block_size-1) / block_size) return st