/[fenfire]/fenfire/org/fenfire/util/MipzipCache.java
ViewVC logotype

Diff of /fenfire/org/fenfire/util/MipzipCache.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by tjl, Tue Apr 22 19:44:54 2003 UTC revision 1.4 by benja, Tue Apr 22 20:22:41 2003 UTC
# Line 20  public class MipzipCache { Line 20  public class MipzipCache {
20    
21      static int RESOLUTION = 200;      static int RESOLUTION = 200;
22    
23      static File tmp = new File("../tmpimg");      static File __tmp = new File("./tmpimg");
24    
25        static File tmp() {
26            if(!__tmp.exists())
27                __tmp.mkdir();
28            return __tmp;
29        }
30    
31      static PythonInterpreter interp;      static PythonInterpreter interp;
32    
# Line 54  public class MipzipCache { Line 60  public class MipzipCache {
60          boolean exist = true;          boolean exist = true;
61          for(int i=0; i<n; i++) {          for(int i=0; i<n; i++) {
62              String base = prefix + (i+1);              String base = prefix + (i+1);
63              File f = new File(tmp, base);              File f = new File(tmp(), base);
64              paths[i] = f.getPath();              paths[i] = f.getPath();
65              tmppaths[i] = new File(tmp, "tmp"+base).getPath();              tmppaths[i] = new File(tmp(), "tmp"+base).getPath();
66              if(!f.exists()) exist = false;              if(!f.exists()) exist = false;
67          }          }
68          if(exist) return paths;          if(exist) return paths;
# Line 76  public class MipzipCache { Line 82  public class MipzipCache {
82          BlockFile f = pages.getBlockFile();          BlockFile f = pages.getBlockFile();
83          if(! interp.get("cv").__call__(new PyObject[] {          if(! interp.get("cv").__call__(new PyObject[] {
84              new PyString(f.getFilename()),              new PyString(f.getFilename()),
85              new PyString(new File(tmp, "tmp"+prefix).getPath()),              new PyString(new File(tmp(), "tmp"+prefix).getPath()),
86              new PyInteger(RESOLUTION)              new PyInteger(RESOLUTION)
87          }).__nonzero__())          }).__nonzero__())
88              throw new Error("Conversion unsuccessful");              throw new Error("Conversion unsuccessful");

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26