File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -116,10 +116,12 @@ async def handle_packet(self):
116
116
else :
117
117
self .aes = ov_aes_cipher .AESCipher ('pass' )
118
118
119
- if data_type == b'file' and os .path .isfile (filename ):
120
- os .remove (filename )
121
- elif data_type == b'link' and os .path .isfile (filename ):
122
- os .remove (filename )
119
+ if data_type == b'file' and os .path .exists (filename ):
120
+ print (f'File exists, deleting: "{ filename } "' )
121
+ oe_common .rm (filename )
122
+ elif data_type == b'link' and os .path .exists (filename ):
123
+ print (f'Link exists, deleting: "{ filename } "' )
124
+ oe_common .rm (filename )
123
125
124
126
if address in self .server .saved_keys :
125
127
ov_sign = ovcrypt .OvSign (self .server .saved_keys [address ].key )
@@ -356,6 +358,7 @@ async def handle_packet(self):
356
358
print (f'Received "{ filename } "' )
357
359
if not os .path .isfile (filename ):
358
360
print (f'File not exist, creating: "{ filename } "' )
361
+ oe_common .check_create_dir (filename )
359
362
pathlib .Path (filename ).touch ()
360
363
elif data_type == b'link' :
361
364
data = b'' .join (data_parts )
Original file line number Diff line number Diff line change 1
1
[metadata]
2
2
name = ovtp
3
- version = 1.0.6.1
3
+ version = 1.0.6.2
4
4
author = Dmitry Yakovlev
5
5
6
6
description = Over Transfer Protocol
You can’t perform that action at this time.
0 commit comments