mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Don't do fsync on unix
This commit is contained in:
parent
a1a9cfef80
commit
6541b5b4af
1 changed files with 3 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
@ -279,7 +280,8 @@ def get_etag_from_fileobject(f):
|
||||||
doesn't change its mtime.
|
doesn't change its mtime.
|
||||||
'''
|
'''
|
||||||
f.flush() # Only this is necessary on Linux
|
f.flush() # Only this is necessary on Linux
|
||||||
os.fsync(f.fileno()) # Apparently necessary on Windows
|
if sys.platform == 'win32':
|
||||||
|
os.fsync(f.fileno()) # Apparently necessary on Windows
|
||||||
return get_etag_from_file(f.name)
|
return get_etag_from_file(f.name)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue