storage: don't use colons in the corruption-advisory filename, since windows can't tolerate them

This commit is contained in:
Brian Warner 2008-10-25 19:46:33 -07:00
parent 9f21f7cf65
commit 5fd6633289

View File

@ -1223,8 +1223,9 @@ class StorageServer(service.MultiService, Referenceable):
fileutil.make_dirs(self.corruption_advisory_dir)
now = time_format.iso_utc(sep="T")
si_s = base32.b2a(storage_index)
# windows can't handle colons in the filename
fn = os.path.join(self.corruption_advisory_dir,
"%s--%s-%d" % (now, si_s, shnum))
"%s--%s-%d" % (now, si_s, shnum)).replace(":","")
f = open(fn, "w")
f.write("report: Share Corruption\n")
f.write("type: %s\n" % share_type)