[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch bug: prompting for filename doesn't accept filenames with spaces
From: |
Ed Avis |
Subject: |
patch bug: prompting for filename doesn't accept filenames with spaces |
Date: |
Tue, 28 Oct 2008 15:14:36 -0000 |
If you run 'patch -p1 <file' then for each diff, patch tries to find the file
that should be patched. If it can't find it then it prompts for the user to
type a filename. But that prompt doesn't accept filenames with spaces: it
chops them before the first space character. It should accept any characters
typed. Here is how to reproduce the bug:
% mkdir old
% echo o >'old/file with spaces'
% mkdir new
% echo n >'new/file with spaces'
% diff -ru old new >patch
% mkdir apply
% cd apply
% touch 'another file with spaces'
% patch -p1 <../patch
can't find file to patch at input line 4 Perhaps you used the wrong -p or
--strip option?
The text leading up to this was:
--------------------------
|diff -ru old/file with spaces new/file with spaces
|--- old/file with spaces 2008-10-28 15:09:42.000000000 +0000
|+++ new/file with spaces 2008-10-28 15:09:47.000000000 +0000
--------------------------
File to patch: another file with spaces
another: No such file or directory
Skip this patch? [y]
% patch --version
patch 2.5.4
Copyright 1984-1988 Larry Wall
Copyright 1989-1999 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program under the terms of the GNU General
Public License.
For more information about these matters, see the file named COPYING.
written by Larry Wall and Paul Eggert
--
Ed Avis <address@hidden>
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- patch bug: prompting for filename doesn't accept filenames with spaces,
Ed Avis <=