Details
-
Improvement
-
Resolution: Won't Do
-
Neutral
-
None
-
5.4.4
-
None
-
All OS
-
-
Yes
-
Empty show more show less
Description
When we use the XML export feature in Magnolia. Magnolia will create a temporary file to import the XML. By default Magnolia will create a temporary file in the default temp directory of the OS. Usually temp directories are:
Linux: /tmp
Windows: %USERPROFILE%\AppData\Local\Temp
In our enterprise system admins create 500Mb partitions for /tmp. The /tmp directory is also naturally fill with scrap files. We hit some problems when a user want to export a large content file and the /tmp partition become full. It would be more manageable if Magnolia were using the directory specified in magnolia.upload.tmpdir. In older version of Magnolia we manually patched our Magnolia-core jar with a fix to use the Magnolia temp directory instead of the default OS directory. It's just one line of code to replace. It was tested in Windows and Linux.
Fix:
magnolia-core in info\magnolia\importexport\DataTransporter.java line 512 in version 5.4.4 :
//will use the temp directory of the OS. On Linux it's /tmp
File tempFile = File.createTempFile("export-" + repository + session.getUserID(), ".xml");
//FIX: will use the temp directory specified with magnolia.upload.tmpdir
File tempFile = File.createTempFile("export-" + repository + session.getUserID(), ".xml", Path.getTempDirectory());