Skip to content
Tcl Source Code Artifact [49371573a6]
Login

Artifact [49371573a6]

Artifact 49371573a6be91420cd1ea3f117080b18e67edcd:

Ticket change [49371573a6] - New ticket [747575ffffffffff|747575ffff] <i>WinNT - [file rename] incorrect error message</i>. by jgodfrey on 2003-06-02 15:01:30.
D 2003-06-02T15:01:30
J assignee dkf
J cmimetype text/plain
J comment System:\sActiveTcl\s8.4.2\s/\sWinNT\n\n-\sIn\sa\sWindows\scommand\swindow,\screate\sa\s\ndirectory.\s\sSay....\s"temp"\n-\sNow,\scd\sinto\sthe\snew\stemp\sdirectory\s(to\stie\sit\sup)\n-\sNow,\sin\sa\stclsh\s(actually,\swish\sconsole\swindow\sin\s\nmy\scase),\stry\sto\nrename\sthe\stemp\sdirectory\sto\s"temp1"\n\n(jgodfrey)\s8\s%\sfile\srename\s-force\s--\stemp\stemp1\nerror\srenaming\s"temp"\sto\s"temp1":\strying\sto\srename\s\na\svolume\sor\smove\sa\ndirectory\sinto\sitself\n(jgodfrey)\s9\s%\n\n"trying\sto\smove\sa\sdirectory\sinto\sitself"?\s\sHuh?\s\sThat\s\ncan't\sbe\nright...\n\n-\sNow,\stry\sto\srename\stemp\sto\sa\sname\sthat\sdoesn't\s\nitself\sbegin\swith\n"temp"...\n\n(jgodfrey)\s9\s%\sfile\srename\s-force\s--\stemp\snewdir\nerror\srenaming\s"temp"\sto\s"newdir":\spermission\s\ndenied\n(jgodfrey)\s10\s%\s\n\nAhhh,\sa\smore\ssensible\smessage...\n\nThe\sproblem\sseems\sto\sbe\sin\s"tclWinFCmd.c"\sin\sthe\s\nfollowing\scode:\n\n\s\s\s\ssrc\s=\sTcl_WinTCharToUtf((TCHAR\s*)\s\nnativeSrcPath,\s-1,\s&srcString);\n\s\s\s\sdst\s=\sTcl_WinTCharToUtf((TCHAR\s*)\s\nnativeDstPath,\s-1,\s&dstString);\n\s\s\s\sif\s(strncmp(src,\sdst,\s(size_t)\s\nTcl_DStringLength(&srcString))\s==\s0)\s{\n/*\n\s*\sTrying\sto\smove\sa\sdirectory\s\ninto\sitself.\n\s*/\n\nThe\ssource\sand\sdestination\sare\scompared,\sbut\sonly\s\nout\sto\sthe\slength\sof\sthe\ssource\sstring.\s\sThere\sseems\s\nto\sbe\smore\sneeded\sin\sthis\scheck,\salthough\sI'm\snot\s\nsure\swhat\sthe\s"safest"\sfix\sis...
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter jgodfrey
J subsystem 17.\sCommands\sI-L
J title WinNT\s-\s[file\srename]\sincorrect\serror\smessage
J type Bug
K 747575ffffffffffffffffffffffffffffffffff
U jgodfrey
Z e47241c97f3cb93dc891d747316fe805