Skip to content
Tcl Source Code Artifact [8ee743a66c]
Login

Artifact [8ee743a66c]

Artifact 8ee743a66c6b5aff0de3253d179b556bb73beec3:

Ticket change [8ee743a66c] - New ticket [da7c079978cb3183|da7c079978] <i>FS strips root &#39;/&#39; from FS root volume &quot;zvfs:/&quot;</i>. by anonymous on 2017-06-08 02:32:33.
D 2017-06-08T02:32:33.305
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment I've\sbeen\sattempting\sto\screate\sa\svfs\swhich\sis\stotally\sisolated\sfrom\sthe\snative\sfs.\sI've\sset\sthe\sTcl_Filesystem\sto\s"zvfs"\sand,\sfollowing\sthe\sexample\sin\stclTest.c,\smy\sFSListVolumesProc\sreturns\sa\ssingle\sTcl_Obj\s"zvfs:/".\r\n\r\nUsing\sa\sminimal\sTcl_Filesystem\swith\sonly\sListVolumes,\sChdir\sand\sPathInFilesystem\s(which\salways\sreturns\sTCL_OK\sunless\sthe\spath\sis\sa\swindows\spath),\sI\sfind\sthat\sTcl\sis\sstripping\sthe\sroot\s'/'\sfrom\swhat\sit\sconsiders\sthe\scwd.\r\n\r\n%\scd\szvfs:/\r\n%\scd\sdir\r\n%\spwd\r\nzvfs:/dir\r\n%\scd\s..\r\n%\spwd\r\nzvfs:\r\n\r\nFor\swindows\spaths,\sthe\s'/'\sis\snot\sstripped\sfrom,\ssay,\s"C:/".\r\n\r\nThe\sroutine\sTclFSNormalizeAbsolutePath\sin\stclPathObj.c\sis\sthe\sculprit.\sIt\sis\staking\s"zvfs:/dir/.."\sand:\r\n\r\n\t\t/*\r\n\t\t\s*\sHave\s'..'\sso\sneed\sto\sskip\sprevious\sdirectory.\r\n\t\t\s*/\r\n\t\tif\s(retVal\s==\sNULL)\s{\r\n\t\t\s\s\s\sconst\schar\s*path\s=\sTclGetString(pathPtr);\r\n\r\n\t\t\s\s\s\sretVal\s=\sTcl_NewStringObj(path,\sdirSep\s-\spath);\r\n\t\t\s\s\s\sTcl_IncrRefCount(retVal);\r\n\t\t}\r\n\r\nremoves\sthe\s'/'\sleaving\s"zvfs:".\sToward\sthe\sbottom\sof\sthe\sfunction\sthere\sis\sspecific\swindows\scode\sto\srestore\sthe\s'/':\r\n\r\n\r\n\s\s\s\s/*\r\n\s\s\s\s\s*\sEnsure\sa\swindows\sdrive\slike\sC:/\shas\sa\strailing\sseparator.\r\n\s\s\s\s\s*/\r\n\r\n\s\s\s\sif\s(tclPlatform\s==\sTCL_PLATFORM_WINDOWS)\s{\r\n\tint\slen;\r\n\tconst\schar\s*path\s=\sTcl_GetStringFromObj(retVal,\s&len);\r\n\r\n\tif\s(len\s==\s2\s&&\spath[0]\s!=\s0\s&&\spath[1]\s==\s':')\s{\r\n\t\s\s\s\sif\s(Tcl_IsShared(retVal))\s{\r\n\t\tTclDecrRefCount(retVal);\r\n\t\tretVal\s=\sTcl_DuplicateObj(retVal);\r\n\t\tTcl_IncrRefCount(retVal);\r\n\t\s\s\s\s}\r\n\t\s\s\s\sTcl_AppendToObj(retVal,\s"/",\s1);\r\n\t}\r\n\s\s\s\s}\r\n\r\nEither:\r\na)\sI\sdon't\sunderstand\swhat\sFSListVolumesProc\sis\ssupposed\sto\sreturn\r\nb)\sIf\s"zvfs:/"\sis\sOK,\sthen\sperhaps\sit's\snot\smeant\sto\sbe\sequivalent\sto\sa\swindows\s"drive"\seven\sthough\sTclpObjListVolumes()\sin\swin/tclWinFCmd.c\sreturns\s"C:/",\setc.\r\nc)\sTcl\sdoes\snot\sconsider\sfs\svolumes\sother\sthan\swindows\r\n\r\nI\sdon't\sknow\sif\sthis\sis\sa\sbug\sor\swhat.\r\n\r\nHow\sis\sa\sfs\ssupposed\sto\stell\sTcl\sabout\sa\svolume\sprefix?\s\r\n\r\nMust\sa\sfs\s"mount"\sits\sdirectory\sstructure\ssomewhere\swithin\s'/'\sfor\sboth\sunix\sand\swindows?\r\n\r\nI\swish\sthere\swas\sa\sreference\sfs\sor\sthe\sdocumentation\swere\smore\sdetailed.
J foundin 8.6.6
J is_private 0
J login anonymous
J priority 5\sMedium
J private_contact b8731723488b9adb1562242d803fdc609ed3d701
J resolution None
J severity Important
J status Open
J submitter anonymous
J subsystem 37.\sFile\sSystem
J title FS\sstrips\sroot\s'/'\sfrom\sFS\sroot\svolume\s"zvfs:/"
J type Bug
K da7c079978cb3183731147d2e6a555794416a5bf
U anonymous
Z b775c688211f8cee06b15294723cd01c