[prev in list] [next in list] [prev in thread] [next in thread]
List: ros-diffs
Subject: [ros-diffs] [cwittich] 32062: don't try to append when there is
From: cwittich () svn ! reactos ! org
Date: 2008-01-31 9:00:27
Message-ID: 20080131090027.A96C1FF03 () mail ! smartxx ! ru
[Download RAW message or body]
Author: cwittich
Date: Thu Jan 31 12:00:27 2008
New Revision: 32062
URL: http://svn.reactos.org/svn/reactos?rev=32062&view=rev
Log:
don't try to append when there is only one parameter given
See issue #3023 for more details.
Modified:
trunk/reactos/base/shell/cmd/copy.c
Modified: trunk/reactos/base/shell/cmd/copy.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/copy.c?rev=32062&r1=32061&r2=32062&view=diff
==============================================================================
--- trunk/reactos/base/shell/cmd/copy.c (original)
+++ trunk/reactos/base/shell/cmd/copy.c Thu Jan 31 12:00:27 2008
@@ -539,17 +539,20 @@
return 1;
}
- if(((_tcschr (arg[nSrc], _T('+')) != NULL) ||
- (_tcschr (arg[nSrc], _T('*')) != NULL && _tcschr (arg[nDes], _T('*')) == \
NULL) ||
- (IsExistingDirectory (arg[nSrc]) && (_tcschr (arg[nDes], _T('*')) == NULL && \
!IsExistingDirectory (arg[nDes])))
- ))
- {
- /* There is a + in the source filename, this means
- that there is more then one file being put into
- one file. */
- bAppend = TRUE;
- if(_tcschr (arg[nSrc], _T('+')) != NULL)
- appendPointer = arg[nSrc];
+ if (nDes != -1) /* you can only append files when there is a destination */
+ {
+ if(((_tcschr (arg[nSrc], _T('+')) != NULL) ||
+ (_tcschr (arg[nSrc], _T('*')) != NULL && _tcschr (arg[nDes], _T('*')) == \
NULL) || + (IsExistingDirectory (arg[nSrc]) && (_tcschr (arg[nDes], \
_T('*')) == NULL && !IsExistingDirectory (arg[nDes]))) + ))
+ {
+ /* There is a + in the source filename, this means
+ that there is more then one file being put into
+ one file. */
+ bAppend = TRUE;
+ if(_tcschr (arg[nSrc], _T('+')) != NULL)
+ appendPointer = arg[nSrc];
+ }
}
/* Reusing the number of files variable */
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic