mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-05 16:37:09 +00:00
chore(display): use seperate libreoffice profie
This commit is contained in:
+6
-1
@@ -48,7 +48,12 @@ func GetDeviceMac() (string, error) {
|
||||
}
|
||||
|
||||
func OpenPresentation(path string) error {
|
||||
cmd := exec.Command("soffice", "--show", path, "--nologo", "--norestore")
|
||||
tempDirPath, err := os.MkdirTemp("", "plg-mudics-libreoffice-profile-")
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create temporary profile directory: %w", err)
|
||||
}
|
||||
|
||||
cmd := exec.Command("soffice", "--show", path, "--nologo", "--norestore", fmt.Sprintf("-env:UserInstallation=file:///%s", tempDirPath))
|
||||
result := shared.RunShellCommand(cmd)
|
||||
if result.ExitCode != 0 {
|
||||
return errors.New(result.Stderr)
|
||||
|
||||
Reference in New Issue
Block a user