diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java index e126e40ec7..f4f74d687c 100644 --- a/core/src/main/java/hudson/FilePath.java +++ b/core/src/main/java/hudson/FilePath.java @@ -1047,6 +1047,9 @@ public final class FilePath implements Serializable { public String validateAntFileMask(final String fileMasks) throws IOException, InterruptedException { return act(new FileCallable() { public String invoke(File dir, VirtualChannel channel) throws IOException { + if(fileMasks.startsWith("~")) + return Messages.FilePath_TildaDoesntWork(); + StringTokenizer tokens = new StringTokenizer(fileMasks,","); while(tokens.hasMoreTokens()) { diff --git a/core/src/main/resources/hudson/Messages.properties b/core/src/main/resources/hudson/Messages.properties index 6c73161ae4..48c4a43875 100644 --- a/core/src/main/resources/hudson/Messages.properties +++ b/core/src/main/resources/hudson/Messages.properties @@ -15,3 +15,4 @@ Util.countSuffix=s # another implication of this is that where we use this, # we often want to add "ago" there Util.pastTime={0} +FilePath.TildaDoesntWork=''~'' is only supported in a Unix shell and nowhere else.