mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed updater in according to the review recommendations.
This commit is contained in:
@@ -20,7 +20,7 @@ public class Utils {
|
||||
myTempDir = File.createTempFile("idea.updater.", ".tmp");
|
||||
delete(myTempDir);
|
||||
myTempDir.mkdirs();
|
||||
Runner.logger.info("created temp file: " + myTempDir.getCanonicalPath());
|
||||
Runner.logger.info("created temp file: " + myTempDir.getPath());
|
||||
}
|
||||
|
||||
return File.createTempFile("temp.", ".tmp", myTempDir);
|
||||
@@ -29,16 +29,16 @@ public class Utils {
|
||||
public static File createTempDir() throws IOException {
|
||||
File result = createTempFile();
|
||||
delete(result);
|
||||
Runner.logger.info("deleted tmp dir: " + result.getCanonicalPath());
|
||||
Runner.logger.info("deleted tmp dir: " + result.getPath());
|
||||
result.mkdirs();
|
||||
Runner.logger.info("created tmp dir: " + result.getCanonicalPath());
|
||||
Runner.logger.info("created tmp dir: " + result.getPath());
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void cleanup() throws IOException {
|
||||
if (myTempDir == null) return;
|
||||
delete(myTempDir);
|
||||
Runner.logger.info("deleted file " + myTempDir.getCanonicalPath());
|
||||
Runner.logger.info("deleted file " + myTempDir.getPath());
|
||||
myTempDir = null;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class Utils {
|
||||
if (files != null) {
|
||||
for (File each : files) {
|
||||
delete(each);
|
||||
Runner.logger.info("deleted file " + each.getCanonicalPath());
|
||||
Runner.logger.info("deleted file " + each.getPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class Utils {
|
||||
}
|
||||
|
||||
public static void copy(File from, File to) throws IOException {
|
||||
Runner.logger.info("from " + from.getCanonicalPath() + " to " + to.getCanonicalPath());
|
||||
Runner.logger.info("from " + from.getPath() + " to " + to.getPath());
|
||||
if (from.isDirectory()) {
|
||||
File[] files = from.listFiles();
|
||||
if (files == null) throw new IOException("Cannot get directory's content: " + from);
|
||||
|
||||
Reference in New Issue
Block a user