Skip to content
This repository
Browse code

In the Mageia 2 user dont see the document in the preview area (i hav…

…e only a grey window)

Changed temporary path from /tmp to ~/.cache
  • Loading branch information...
commit 100034774f70945395b3270303b90eb9e613e25f 1 parent 4836bfb
Alexander Sokolov SokoloffA authored

Showing 1 changed file with 20 additions and 11 deletions. Show diff stats Hide diff stats

  1. +20 11 cups/boomaga
31 cups/boomaga
@@ -7,8 +7,6 @@
7 7 #
8 8
9 9
10   -TMP_DIR="/tmp"
11   -
12 10 CUPS_BACKEND_OK=0
13 11 CUPS_BACKEND_FAILED=1
14 12
@@ -29,15 +27,7 @@ user=$2
29 27 title=$3
30 28 count=$4
31 29 options=$5
32   -psFile=$6
33   -
34   -if [ -z ${psFile} ];
35   -then
36   - psFile=${TMP_DIR}/boomaga_in_file-${jobID}.ps
37   - cat - > ${psFile}
38   -fi
39   -chown ${user} ${psFile}
40   -
  30 +inputFile=$6
41 31
42 32 uid=$(getent passwd ${user} | cut -d':' -f 3)
43 33 homeDir=$(getent passwd ${user} | cut -d':' -f 6)
@@ -57,6 +47,25 @@ fi
57 47 echo "DEBUG: User: $user" >&2
58 48 echo "DEBUG: Uid: $uid" >&2
59 49
  50 +psFileDir=${homeDir}/.cache
  51 +psFile=${psFileDir}/boomaga_in_file-${jobID}.ps
  52 +
  53 +if [ ! -d ${psFileDir} ];
  54 +then
  55 + mkdir ${psFileDir}
  56 + chmod 700 ${psFileDir}
  57 + chown ${user} ${psFileDir}
  58 +fi
  59 +
  60 +if [ -z ${inputFile} ];
  61 +then
  62 + cat - > ${psFile}
  63 +else
  64 + cp ${inputFile} ${psFile}
  65 +fi
  66 +chown ${user} ${psFile}
  67 +
  68 +
60 69 oldIfs=$IFS
61 70 IFS=$(echo -en "\n")
62 71 while read line; do

0 comments on commit 1000347

Please sign in to comment.
Something went wrong with that request. Please try again.