From 0dbaedaff081634dc6326cae4df130135afd2436 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Sat, 30 Mar 2013 16:05:19 +0400 Subject: [PATCH] [dvcs tests] Create file by relative path --- .../testFramework/com/intellij/dvcs/test/Executor.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/platform/dvcs/testFramework/com/intellij/dvcs/test/Executor.java b/platform/dvcs/testFramework/com/intellij/dvcs/test/Executor.java index 4414ba5d83e5..6e16ed855927 100644 --- a/platform/dvcs/testFramework/com/intellij/dvcs/test/Executor.java +++ b/platform/dvcs/testFramework/com/intellij/dvcs/test/Executor.java @@ -63,13 +63,15 @@ public class Executor { return ourCurrentDir; } - public static String touch(String fileName) { + public static String touch(String filePath) { try { - File file = child(fileName); + File file = child(filePath); assert !file.exists() : "File " + file + " shouldn't exist yet"; + //noinspection ResultOfMethodCallIgnored + new File(file.getParent()).mkdirs(); // ensure to create the directories boolean fileCreated = file.createNewFile(); assert fileCreated; - log("touch " + fileName); + log("touch " + filePath); return file.getPath(); } catch (IOException e) {