Commit 3851acf2 authored by Nicolas Wavrant's avatar Nicolas Wavrant

fixup! erp5_web_service: add also prefix when writing temporary file

parent 238ff559
Pipeline #17807 failed with stage
in 0 seconds
......@@ -104,9 +104,10 @@ class FTPConnector(XMLObject):
conn = self.getConnection()
try:
if self.isUseTemporaryFileOnWrite():
temp_filename = '_%s.tmp' % filename
# Simulation transaction system
conn.writeFile(remotepath, '_%s.tmp' % filename, data, confirm=confirm)
self.activate(activity='SQLQueue').renameFile('_%s/%s.tmp' % (remotepath, filename),
conn.writeFile(remotepath, temp_filename, data, confirm=confirm)
self.activate(activity='SQLQueue').renameFile('%s/%s' % (remotepath, temp_filename),
'%s/%s' % (remotepath, filename))
else:
conn.writeFile(remotepath, '%s' % filename, data, confirm=confirm)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment