https://bugs.documentfoundation.org/show_bug.cgi?id=173637

            Bug ID: 173637
           Summary: Cannot edit DOCX with very long filename because
                    LibreOffice cannot create lock file
           Product: LibreOffice
           Version: 26.8.0.3 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

Description:
LibreOffice opens a writable DOCX as read-only when the document filename is
very long.

The document itself is writable, and the containing directory is also writable.
Renaming the same file to a short filename makes it editable immediately.

LibreOffice shows an error saying it cannot create the lock file for exclusive
access because of permissions or insufficient free space.

This appears to happen because LibreOffice constructs a lock filename like:

.~lock.<original filename>#

If the original filename is already near the filesystem filename-length limit,
the generated lock filename can exceed that limit.

Steps to Reproduce:
1. Create or download a DOCX whose filename is close to the filesystem
filename-length limit.
2. Place it in a directory that is writable by the current user.
3. Confirm that the DOCX itself is writable.
4. Open the DOCX in LibreOffice Writer.
5. LibreOffice displays an error that it cannot create the lock file and offers
to open the file read-only.
6. Rename the same DOCX to a short filename, for example document.docx.
7. Open it again in LibreOffice Writer.

Actual Results:
LibreOffice fails to create the lock file and opens/offers to open the document
read-only, despite the document and directory being writable.

Expected Results:
LibreOffice should allow the document to be edited. Lock-file handling should
work even when the original document filename is close to the filesystem
filename-length limit, for example by shortening or hashing the generated lock
filename.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
None

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to