Skip to content
Tcl Source Code Artifact [4de041e5d5]
Login

Artifact [4de041e5d5]

Artifact 4de041e5d503d2c4c9b21189b926f1a29ec9a3a5:

Ticket change [4de041e5d5] - New ticket [1586470fffffffff|1586470fff] <i>[file copy] doesn&#39;t copy file contents on afs</i>. by tngd on 2006-10-29 00:38:57.
D 2006-10-29T00:38:57
J assignee vincentdarley
J cmimetype text/plain
J comment Environment:\nLinux\sGentoo\sDual\sProcessor\sAMD64\nTcl\s8.5a6(CVS)\s-\sproblem\slocated\s(and\ssolved)\shere\nTcl\s8.4.9\s-\ssystem\sversion,\sdisplays\ssame\sproblem\n\nIn\smy\suniversity\sshell\saccount,\swe\suse\safs\sfilesystems\non\sour\shome\sdirectories.\n\nWhen\si\stry\sto\suse\s[file\scopy\s$src\s$dst]\sand\sthe\s$src\nfile\sis\slocated\son\sthe\safs\sfilesystem,\sthe\s$dst\sfile\nwill\sbe\san\sempty\sfile\s(size\s=\s0).\n\nI\stracked\sthe\sproblem\sto\sthe\sfollowing\scode\slocated\sin\nthe\sfile\stcl/unix/tclUnixFCmd.c(TclUnixCopyFile):\n\n\s\s\s\s#ifdef\sHAVE_ST_BLKSIZE\n\s\s\s\s\s\s\s\sblockSize\s=\sstatBufPtr->st_blksize;\n\s\s\s\s#else\n\nin\sthis\scase,\sblockSize\swill\shave\sthe\svalue\s0,\swhich\nleads\sto\s(un)expected\sresults\swhen\sreading\sfrom\sthe\nsource\sfile\sand\sit\streats\sit\sas\sEOF.\n\nWhy\sdoes\sthis\shappen\s(blockSize\s=\s0)?\sI\shave\sno\sidea...\nbut\smost\slikely\srelated\sto\sthe\sfact\sthat\sthe\ssource\nfilesystem\sis\safs.\n\nA\sworkaround\swould\sbe\sto\stest\sthe\sblockSize\svalue\swhen\nit\shas\sa\snonpositive\svalue\sand\sreplace\sit\swith\sa\ndefault\svalue\swhen\sit\shappens.\sWith\sthis\scheck\sall\nfiles\swere\scopied\scorrectly.\n\nI\snoticed\sthere\sis\sanother\ssimilar\ssituation\swhen\sthis\nalso\smight\shappen;\swhen\sstatfs\sinformation\sis\sused\son\nthe\ssource\sfile\si\sguess\sthis\sbehaviour\smight\slead\sto\nsimilar\sproblems,\sbut\si'm\sjust\sguessing\son\sthis\sone.\n\nThe\sproblem\swas\sfound\swhile\sbuilding/testing\stcl\sfrom\ncvs\sHEAD,\sbut\sthe\stcl\sinstalled\son\sthe\ssystem\s-\ntcl8.4.9\s-\swas\sshowing\sthe\ssame\sproblem.
J foundin obsolete:\s8.5a5
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter tngd
J subsystem 37.\sFile\sSystem
J title [file\scopy]\sdoesn't\scopy\sfile\scontents\son\safs
J type Bug
K 1586470fffffffffffffffffffffffffffffffff
U tngd
Z cb3cdebdd53805217a46d755d298aeb3