We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5ffd61 commit ec8794dCopy full SHA for ec8794d
otsserver/backup.py
@@ -114,7 +114,9 @@ def read_disk_cache(self, chunk):
114
def write_disk_cache(self, chunk, bytes):
115
chunk_str = "{0:0>7}".format(chunk)
116
chunk_path = chunk_str[0:3]
117
- cache_file = self.cache_path + '/' + chunk_path + '/' + chunk_str
+ cache_path = self.cache_path + '/' + chunk_path
118
+ os.makedirs(cache_path, exist_ok=True)
119
+ cache_file = cache_path + '/' + chunk_str
120
with open(cache_file, 'w') as fd:
121
fd.write(bytes)
122
0 commit comments