D 2011-05-05T21:08:24.871
J +comment \n\n
anonymous\sclaiming\sto\sbe\sIngo\sKoch\sadded\son\s2011-05-05\s21:08:24\sUTC:
\nThe\sbug\swas\sintroduced\swith\sversion\s[53aef2dee1]\sin\s\s\r\nint\svfile_top_of_checkout(const\schar\s*zPath)\r\n\r\nThe\smprintf\sis\scalled\swithout\szPath.\sI\sadded\ssome\sdebug\soutput\sand\ssaw\sthat\sthe\sfirst\szFile\scontains\sa\svalid\spath\sbut\sthe\ssecond\sone\scontained\sgarbage.\r\n\r\nI\sdon't\sknow\swhy\sit\sworks\sfor\sthe\sfirst\scall,\sbut\sthe\ssecond\scrashes\sfossil\sunder\sWindows.\r\n\r\nHere\sis\sa\scorrection:\r\n\r\nIndex:\ssrc/vfile.c\r\n===================================================================\r\n---\ssrc/vfile.c\r\n+++\ssrc/vfile.c\r\n@@\s-301,15\s+301,15\s@@\r\n\s*/\r\n\sint\svfile_top_of_checkout(const\schar\s*zPath){\r\n\s\s\schar\s*zFile;\r\n\s\s\sint\sfileFound\s=\s0;\r\n\s\r\n-\s\szFile\s=\smprintf("%s/_FOSSIL_");\r\n+\s\szFile\s=\smprintf("%s/_FOSSIL_",zPath);\r\n\s\s\sfileFound\s=\sfile_size(zFile)>=1024;\r\n\s\s\sfossil_free(zFile);\r\n\s\s\sif(\s!fileFound\s){\r\n-\s\s\s\szFile\s=\smprintf("%s/.fos");\r\n+\s\s\s\szFile\s=\smprintf("%s/.fos",zPath);\r\n\s\s\s\s\sfileFound\s=\sfile_size(zFile)>=1024;\r\n\s\s\s\s\sfossil_free(zFile);\r\n\s\s\s}\r\n\s\s\sreturn\sfileFound;\r\n\s}\r\n
J resolution Open
J type Code_Defect
K b733bba0b7319ef2dc9d74526dab7eec29460fcd
U anonymous
Z e34c61547c99c76d88750acacf8441da