mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-07 11:05:52 +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 -*-
|
||||
|
||||
import os
|
||||
import sys
|
||||
import threading
|
||||
|
||||
import requests
|
||||
|
|
@ -279,7 +280,8 @@ def get_etag_from_fileobject(f):
|
|||
doesn't change its mtime.
|
||||
'''
|
||||
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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue