Changeset 2350f4 in indico


Ignore:
Timestamp:
02/07/12 16:59:19 (17 months ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 4287315ec967a3da168d83963c14001db8487d53
Children:
2e0cb9
Parents:
1d5dc6
Message:

[FIX] Duplicate file delete after request

  • In case of conflict the file would be added twice to the list and

Indico would try to delete it twice at the end of the request.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/webinterface/rh/conferenceBase.py

    rb58f4b r2350f4  
    210210                shutil.copyfileobj(fd, f) 
    211211            self._tempFiles[fd] = fileName 
     212            # queue file for deletion at end of request 
     213            self._tempFilesToDelete.append(fileName) 
    212214        return self._tempFiles[fd] 
    213215 
     
    263265                        fDict["filePath"] = self._saveFileToTemp(fileUpload.file) 
    264266                        fDict["size"] = os.path.getsize(fDict["filePath"]) 
    265                         self._tempFilesToDelete.append(fDict["filePath"]) 
    266267 
    267268                    self._setErrorList(fDict) 
Note: See TracChangeset for help on using the changeset viewer.