QDir::mkdir don't work with creating of nested directory, so when cantor_rserver try to create $TPDIR/cantor/rserver-XXX, the directory don't be created and it breaks output for image, lists (lists prints as html table), etc.
Details
- Reviewers
asemke
- Start R backend
- run x <- seq(-pi, pi, len=50)
- run plot(x)
- Check, that plot appears.
Diff Detail
- Repository
- R55 Cantor
- Branch
- fix-R-backend-tmpdir-error
- Lint
No Linters Available - Unit
No Unit Test Coverage
@asemke, Could you confirm this R backend bug after applying and testing this patch with images? I have found a solution, that fix this for me, but the solution changes mime-types and I begin to doubt, that this is bug of Cantor and not mimetype errors in my system.
I can confirm that BUG 394018 and also the issues with the plots is fixed with your change. However, I'm seeing yet another inconsistency in Cantor's code with respect to the names of the temporary folders and files. Check for example maximaexpression.cpp:72 and similar for juliaexpressions and maybe for other backends. Should we remove the subfolder structure in rserver and go for a simple
m_tmpDir = QDir::tempPath() + QString::fromLatin1("/cantor_rserver-%1").arg(getpid()); QDir dir; dir.mkdir(m_tmpDir);
?
If I understand you correctly, you have non empty output of the commands like d <- c(1,2,3), didn't it?