mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 14:52:26 +00:00
crawler: use fileutil.move_info_place in preference to our own version
This commit is contained in:
parent
89f041ac83
commit
dfd72c6483
@ -1,8 +1,9 @@
|
||||
|
||||
import sys, os, time, struct, pickle
|
||||
import os, time, struct, pickle
|
||||
from twisted.internet import reactor
|
||||
from twisted.application import service
|
||||
from allmydata.storage.server import si_b2a
|
||||
from allmydata.util import fileutil
|
||||
|
||||
class TimeSliceExceeded(Exception):
|
||||
pass
|
||||
@ -89,10 +90,7 @@ class ShareCrawler(service.MultiService):
|
||||
f = open(tmpfile, "wb")
|
||||
pickle.dump(state, f)
|
||||
f.close()
|
||||
if "win32" in sys.platform.lower():
|
||||
# sigh, stupid windows can't use this technique
|
||||
os.unlink(self.statefile)
|
||||
os.rename(tmpfile, self.statefile)
|
||||
fileutil.move_into_place(tmpfile, self.statefile)
|
||||
|
||||
def startService(self):
|
||||
self.load_state()
|
||||
|
Loading…
Reference in New Issue
Block a user