Skip to content

Conversation

@nbs2904
Copy link

@nbs2904 nbs2904 commented Oct 15, 2025

This commit addresses several platform-specific issues to ensure reliable document previewing across operating systems:

  1. LibreOffice Binary: Replaces hardcoded libreoffice binary name. New logic dynamically checks the PATH for both libreoffice (Linux) and soffice (Windows) to execute the conversion command.
  2. Username Retrieval: Replaces the Yazi-specific and non-functional-on-Windows functions (ya.uid() and ya.user_name()) with a platform-independent method (e.g., using os.getenv("USER") or similar) to retrieve the current user's name for safe creation of temporary directories.

Refs: #6, #11

This commit addresses several platform-specific issues to ensure reliable document previewing across operating systems:

1.  **LibreOffice Binary:** Replaces hardcoded `libreoffice` binary name. New logic dynamically checks the PATH for both `libreoffice` (Linux) and `soffice` (Windows) to execute the conversion command.
2.  **Username Retrieval:** Replaces the Yazi-specific and non-functional-on-Windows functions (`ya.uid()` and `ya.user_name()`) with a platform-independent method (e.g., using `os.getenv("USER")` or similar) to retrieve the current user's name for safe creation of temporary directories.

Refs: macydnah#6, macydnah#11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant