mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Changes to be nice to Windows.
This commit is contained in:
parent
6107000658
commit
1fa9f7990b
@ -148,7 +148,11 @@ class PeriodicFileDownloader(object):
|
||||
self.downloadedCounter[filename] += 1
|
||||
self.lastDownloaded[filename] = time.time()
|
||||
if f is None:
|
||||
os.rename(newFilename, os.path.join(conf.dataDir, filename))
|
||||
toFilename = os.path.join(conf.dataDir, filename)
|
||||
if os.name == 'nt':
|
||||
# Windows, grrr...
|
||||
os.remove(toFilename)
|
||||
os.rename(newFilename, toFilename)
|
||||
else:
|
||||
start = time.time()
|
||||
f(newFilename)
|
||||
|
Loading…
Reference in New Issue
Block a user