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

fixup! erp5_web_service: add also prefix when writing temporary file

parent 238ff559
...@@ -104,9 +104,10 @@ class FTPConnector(XMLObject): ...@@ -104,9 +104,10 @@ class FTPConnector(XMLObject):
conn = self.getConnection() conn = self.getConnection()
try: try:
if self.isUseTemporaryFileOnWrite(): if self.isUseTemporaryFileOnWrite():
temp_filename = '_%s.tmp' % filename
# Simulation transaction system # Simulation transaction system
conn.writeFile(remotepath, '_%s.tmp' % filename, data, confirm=confirm) conn.writeFile(remotepath, temp_filename, data, confirm=confirm)
self.activate(activity='SQLQueue').renameFile('_%s/%s.tmp' % (remotepath, filename), self.activate(activity='SQLQueue').renameFile('%s/%s' % (remotepath, temp_filename),
'%s/%s' % (remotepath, filename)) '%s/%s' % (remotepath, filename))
else: else:
conn.writeFile(remotepath, '%s' % filename, data, confirm=confirm) 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