Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19537

Office importer temp files should be grouped under a common top folder inside the temp folder

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 13.4.3
    • Office
    • None
    • Easy

    Description

      This is how the current temp folder looks like:

      /var/cache/tomcat9/Catalina/localhost/ROOT/xwiki-temp# ls -al
      total 2604
      drwxr-x--- 18 tomcat tomcat 2588672 Mar 21 11:33 .
      drwxr-x---  3 tomcat tomcat    4096 Mar 18 23:04 ..
      drwxr-x---  4 tomcat tomcat    4096 Mar 19 17:20 0f007328-015f-420d-87a4-fb5f42ee1ea5
      drwxr-x---  4 tomcat tomcat    4096 Mar 20 11:42 5a7bc5b0-7f81-4dea-9cfa-efa275ab18c8
      drwxr-x---  4 tomcat tomcat    4096 Mar 21 05:19 5ed61002-8016-491b-b870-d74b0e953071
      drwxr-x---  4 tomcat tomcat    4096 Mar 20 03:23 5ff76c98-c2b4-48f5-9c8b-16c40d27a1a8
      drwxr-x---  4 tomcat tomcat    4096 Mar 21 06:00 713ee0df-f898-4c82-9e3b-cbcaeccd07e7
      drwxr-x---  4 tomcat tomcat    4096 Mar 20 14:38 7a8c0265-ff3e-405b-b614-b144c8c96d54
      drwxr-x---  4 tomcat tomcat    4096 Mar 21 00:50 9439285f-259c-42f8-bbf1-ad459d1a7cd2
      drwxr-x---  4 tomcat tomcat    4096 Mar 20 01:51 9ee9e8aa-14bd-40b6-a155-76df34dbf417
      drwxr-x---  2 tomcat tomcat    4096 Mar 19 12:24 attachment-cache
      drwxr-x---  2 tomcat tomcat    4096 Mar 18 23:08 cache
      drwxr-x---  4 tomcat tomcat    4096 Mar 21 00:30 ef1eb2e8-17f5-4ce0-8a57-a91f6dd38c3b
      drwxr-x---  3 tomcat tomcat    4096 Mar 18 23:09 extension
      drwxr-x---  2 tomcat tomcat    4096 Mar 19 00:00 mail
      drwxr-x---  2 tomcat tomcat    4096 Mar 18 23:08 svg
      drwxr-x---  3 tomcat tomcat    4096 Mar 19 03:35 temp
      drwxr-x---  3 tomcat tomcat    4096 Mar 19 13:16 tmp
      

      It's obviously polluted by the office temp folders (produced during import/export) that should be instead grouped under a common folder, for better organization and tracability.

      I've traced the code issue to this initialization phase where the temp folder itself is assigned as workdir, instead of a subfolder inside the temp folder:
      https://github.com/xwiki/xwiki-platform/blob/73b07f8352d1716b9945b577d6e4a3334f058a77/xwiki-platform-core/xwiki-platform-office/xwiki-platform-office-importer/src/main/java/org/xwiki/officeimporter/internal/server/DefaultOfficeServer.java#L169-L170

      Attachments

        Activity

          People

            Unassigned Unassigned
            enygma Eduard Moraru
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: