mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 22:51:01 +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.downloadedCounter[filename] += 1
|
||||||
self.lastDownloaded[filename] = time.time()
|
self.lastDownloaded[filename] = time.time()
|
||||||
if f is None:
|
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:
|
else:
|
||||||
start = time.time()
|
start = time.time()
|
||||||
f(newFilename)
|
f(newFilename)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user