mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 00:05:53 +02:00
[285945] Fix quoting ! and " characters
This commit is contained in:
parent
10ece6b31e
commit
1ca6e62c46
1 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved.
|
* Copyright (c) 2006, 2009 IBM Corporation and others. All rights reserved.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
* Martin Oberhuber (Wind River) - Fix 183991 - handle windows C:/ paths for FTP
|
* Martin Oberhuber (Wind River) - Fix 183991 - handle windows C:/ paths for FTP
|
||||||
* Martin Oberhuber (Wind River) - [246710] Fix quoting backslashes in UNIX shells
|
* Martin Oberhuber (Wind River) - [246710] Fix quoting backslashes in UNIX shells
|
||||||
* Martin Oberhuber (Wind River) - [164110] Fix quoting single-quotes in UNIX shells
|
* Martin Oberhuber (Wind River) - [164110] Fix quoting single-quotes in UNIX shells
|
||||||
|
* Martin Oberhuber (Wind River) - [285945] Fix quoting ! and " characters
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.services.clientserver;
|
package org.eclipse.rse.services.clientserver;
|
||||||
|
@ -229,6 +230,7 @@ public class PathUtility
|
||||||
case '\\':
|
case '\\':
|
||||||
case '\'':
|
case '\'':
|
||||||
case '`':
|
case '`':
|
||||||
|
case '"':
|
||||||
//Need to treat specially to work in both bash and tcsh:
|
//Need to treat specially to work in both bash and tcsh:
|
||||||
//close the quote, insert quoted $, reopen the quote
|
//close the quote, insert quoted $, reopen the quote
|
||||||
buf.append('"');
|
buf.append('"');
|
||||||
|
@ -236,8 +238,8 @@ public class PathUtility
|
||||||
buf.append(c);
|
buf.append(c);
|
||||||
buf.append('"');
|
buf.append('"');
|
||||||
break;
|
break;
|
||||||
case '"':
|
|
||||||
case '\n':
|
case '\n':
|
||||||
|
case '!':
|
||||||
//just quote it. The newline will work in tcsh only -
|
//just quote it. The newline will work in tcsh only -
|
||||||
//bash replaces it by the empty string. But newlines
|
//bash replaces it by the empty string. But newlines
|
||||||
//in filenames are an academic issue, hopefully.
|
//in filenames are an academic issue, hopefully.
|
||||||
|
|
Loading…
Add table
Reference in a new issue