Affects Version/s: 7.0.X, 7.1.X, Master
Component/s: Staging > Export/Import
Steps to reproduce (master: b82083420f217cad70a99532ebf3145e92366a94):
1. Add a Basic Document called "test.pdf" using any local file available.
2. Add a Shortcut in Liferay DXP site to "test.pdf".
3. Export the Liferay DXP site.
Result: The site is exported successfully.
4. In the database, introduce an integrity corruption by deleting the DLFileEntry:
delete from DLFileEntry where title = 'test.pdf';
5. Clear the database cache in control panel -> Server Administration.
6. Relaunch the export.
Result: Export fails as expected with the following error on page:
However, the File handle to temp file is not released.
If your OS is wins, please use "handle -p 15328" (15328 is liferay process) (https://docs.microsoft.com/en-us/sysinternals/downloads/handle) to check this. You also will find the temp file can't be deleted from directory.
Temp file should not display as opened file. We should close the file stream.