Fix some part of MoveFileExW Bug, Can not move folder, but it still can
not move folder. some bit more work.
Modified: trunk/reactos/lib/kernel32/file/move.c
_____
Modified: trunk/reactos/lib/kernel32/file/move.c
--- trunk/reactos/lib/kernel32/file/move.c 2005-09-17 19:38:34 UTC
(rev 17900)
+++ trunk/reactos/lib/kernel32/file/move.c 2005-09-17 21:02:38 UTC
(rev 17901)
@@ -325,7 +325,7 @@
FILE_SHARE_WRITE|FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
+ FILE_FLAG_BACKUP_SEMANTICS,
NULL);
if (hFile == INVALID_HANDLE_VALUE)
@@ -366,6 +366,13 @@
sizeof(FILE_RENAME_INFORMATION)
+ DstPathU.Length,
FileRenameInformation);
CloseHandle(hFile);
+
+ /*
+ * FIXME:
+ * Fail now move the folder
+ * Before we fail at CreateFileW
+ */
+
if (NT_SUCCESS(errCode))
{
Result = TRUE;
Bug fix dir *. it only show folders
Modified: trunk/reactos/subsys/system/cmd/dir.c
_____
Modified: trunk/reactos/subsys/system/cmd/dir.c
--- trunk/reactos/subsys/system/cmd/dir.c 2005-09-17 17:16:33 UTC
(rev 17897)
+++ trunk/reactos/subsys/system/cmd/dir.c 2005-09-17 18:56:16 UTC
(rev 17898)
@@ -240,6 +240,8 @@
BOOL bPNegative; /* Negative switch parameter */
BOOL bIntoQuotes; /* A flag showing if we are in quotes (") */
LPTSTR ptrLast; /* A pointer to the last character of param */
+ INT t = 0;
+
/* Initialize variables; */
cCurSwitch = _T(' ');
@@ -258,6 +260,32 @@
lpFlags->stOrderBy.bParSetted = TRUE;
lpFlags->stTimeField.bParSetted = TRUE;
+
+ /* Add correct handling of *. */
+ for(t=0;t<_tcslen(Line);t++)
+ {
+ static INT count=0;
+
+ if ((count==0) && (Line[t]==_T('*')))
+ count++;
+
+ else if ((count==1) && (Line[t]==_T('.')))
+ count++;
+
+ else if ((count==2) && (Line[t]==_T('*')))
+ count++;
+
+ else if (!_istspace(Line[t]))
+ {
+ if (count==2)
+ lpFlags->bWideListColSort = ! bNegative;
+ count=-1;
+ }
+ }
+
+
+
+
/* Main Loop (see README_DIR.txt) */
/* scan the command line char per char, and we process its char
*/
while (*Line)