Revision: 14660
          http://gate.svn.sourceforge.net/gate/?rev=14660&view=rev
Author:   markagreenwood
Date:     2011-12-04 11:13:12 +0000 (Sun, 04 Dec 2011)
Log Message:
-----------
download plugins into the tmp folder rather than the running directory where we 
might not have write permissions

Modified Paths:
--------------
    gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java

Modified: gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
===================================================================
--- gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java     
2011-12-04 11:11:22 UTC (rev 14659)
+++ gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java     
2011-12-04 11:13:12 UTC (rev 14660)
@@ -279,7 +279,7 @@
           Expander expander = new Expander();
           expander.setOverwrite(true);
           expander.setDest(getUserPluginsHome());
-
+          
           // store the list of failed plugins
           List<CreolePlugin> failed = new ArrayList<CreolePlugin>();
 
@@ -327,10 +327,7 @@
               try {
 
                 // download the new version
-                // TODO download this into the tmp directory
-                File downloaded =
-                        new File("pluigin-" + System.currentTimeMillis()
-                                + ".zip");
+                File downloaded = File.createTempFile("gate-plugin", ".zip");  
              
                 downloadFile(p.getName(), p.downloadURL, downloaded);
 
                 // try to rename the existing plugin folder
@@ -377,9 +374,7 @@
                               + p.getName());
               try {
                 // download the zip file
-                File downloaded =
-                        new File("pluigin-" + System.currentTimeMillis()
-                                + ".zip");
+                File downloaded = File.createTempFile("gate-plugin", ".zip");
                 downloadFile(p.getName(), p.downloadURL, downloaded);
 
                 // unpack it into the right place

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to