cargaji · GitHub

Environment

  • TeXstudio: 4.9.3
  • Qt: 6.11.0 R
  • OS: ArchLinux
  • TeX distribution: texlive

Expected behavior

Starting teamtype via the "Tools" > "Start sharing folder" menu entry should start a sharing session or show the corresponding error.

Actual behavior

The collaboration system does not start, no error is provided. If TeXstudio has been launched from a terminal, the stdout will show the following error:

Collab Server Output: "Error: Failed to launch the daemon\n\nCaused by:\n    path must be shorter than SUN_LEN\n"

How to reproduce

  1. Install teamtype
  2. Create a folder with a long path (e.g. mkdir --verbose $(openssl rand -hex 100)) and create/open a file in that folder.
  3. Click on Tools > Start sharing folder
  4. Nothing happens

Reasons behind the bug

This bug was originally reported to teamtype, as their tool also fails when used outside TeXstudio (see teamtype/teamtype#462), but they have created a fix (see teamtype/teamtype#537, pending merge), which when compiled locally works correctly.

The underlying issue is that socket creation is limited to 104/108 chars on macOS/Linux (respectively), and teamtype was passing the full directory to the socket creation command. After the fix, teamtype passes the relative path to avoid this issue.

However, TeXstudio uses the full directory path when launching teamtype:

const QStringList args2={"client", "--directory", folder};

This could be avoided by starting teamtype with current directory folder instead of passing --directory {folder} as parameter.

This fix will not be effective until teamtype publishes the fixed version, which should not take long (I assume).

Read the original on github.com ↗