From: Brian Warner <warner@lothar.com>
Date: Sun, 26 Oct 2008 02:46:33 +0000 (-0700)
Subject: storage: don't use colons in the corruption-advisory filename, since windows can... 
X-Git-Url: https://git.rkrishnan.org/simplejson/components/%22news.html/running.html?a=commitdiff_plain;h=5fd663328944fa390701527aaaa244a64ae4ecc2;p=tahoe-lafs%2Ftahoe-lafs.git

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

diff --git a/src/allmydata/storage.py b/src/allmydata/storage.py
index 24bf8a00..7387daef 100644
--- a/src/allmydata/storage.py
+++ b/src/allmydata/storage.py
@@ -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)