Skip to content
Snippets Groups Projects
Commit c62aa483 authored by Jonathan Ehret's avatar Jonathan Ehret
Browse files

fix crash when file is send for the first time

parent 26f5281e
Branches
No related tags found
No related merge requests found
......@@ -428,9 +428,12 @@ class VirtualAcousticsLauncher:
if iLocalFileLastModification<iLastModificationTime:
bNewerFileExists = True
iLocalFileSize = 0
if os.path.isfile(Fullpath+Filename):
iLocalFileSize = os.stat(Fullpath+Filename).st_size
#check whether the file with this exact size (which is not older than the file to send) already exists
iLocalFileSize = os.stat(Fullpath+Filename).st_size
if os.path.isfile(Fullpath+Filename) and iLocalFileSize == iBytesToReceive and not bNewerFileExists :
if iLocalFileSize == iBytesToReceive and not bNewerFileExists :
self.oLauncherConnection.send( b'exists' )
print("File already exists (same size, and more recent modification time), so no need for resending")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment