[{"data":1,"prerenderedAt":613},["ShallowReactive",2],{"docs-navigation:en":3,"content-page:docs:2Zh69N9O4R-ACII4RxJNoksFZJ3qS43CF9SCFpprrrM":195,"content-page-surround:docs:2Zh69N9O4R-ACII4RxJNoksFZJ3qS43CF9SCFpprrrM":602,"i-lucide:file":607,"i-lucide:clipboard":611},[4,54,74],{"title":5,"page":6,"canonicalKey":7,"locale":8,"id":9,"draft":6,"icon":10,"sidebar":11,"children":12},"Guides",false,"1","en","content:en:1.docs:1.guides:.navigation.yml","lucide:route","section",[13,19,26,33,40,47],{"title":14,"id":15,"canonicalKey":16,"locale":8,"draft":6,"icon":17,"path":18},"Install Guild Wars on Mac","content:en:1.docs:1.guides:1.install.md","1\u002F1","lucide:download","\u002Fdocs\u002Fguides\u002Finstall",{"title":20,"id":21,"canonicalKey":22,"locale":8,"draft":6,"navigation":23,"icon":24,"path":25},"Accounts & mobile linking","content:en:1.docs:1.guides:2.accounts.md","1\u002F2",{"title":20},"lucide:key-round","\u002Fdocs\u002Fguides\u002Faccounts",{"title":27,"id":28,"canonicalKey":29,"locale":8,"draft":6,"navigation":30,"icon":31,"path":32},"Play on Mac: options","content:en:1.docs:1.guides:3.play-guild-wars-on-mac.md","1\u002F3",{"title":27},"lucide:scale","\u002Fdocs\u002Fguides\u002Fplay-guild-wars-on-mac",{"title":34,"id":35,"canonicalKey":36,"locale":8,"draft":6,"navigation":37,"icon":38,"path":39},"Performance","content:en:1.docs:1.guides:4.performance.md","1\u002F4",{"title":34},"lucide:gauge","\u002Fdocs\u002Fguides\u002Fperformance",{"title":41,"id":42,"canonicalKey":43,"locale":8,"draft":6,"navigation":44,"icon":45,"path":46},"Templates","content:en:1.docs:1.guides:5.templates.md","1\u002F5",{"title":41},"lucide:bookmark","\u002Fdocs\u002Fguides\u002Ftemplates",{"title":48,"id":49,"canonicalKey":50,"locale":8,"draft":6,"navigation":51,"icon":52,"path":53},"Troubleshooting","content:en:1.docs:1.guides:6.troubleshooting.md","1\u002F6",{"title":48},"lucide:wrench","\u002Fdocs\u002Fguides\u002Ftroubleshooting",{"title":55,"page":6,"canonicalKey":56,"locale":8,"id":57,"draft":6,"icon":58,"sidebar":59,"children":60},"Project","2","content:en:1.docs:2.project:.navigation.yml","lucide:shield-check","group",[61,67],{"title":62,"id":63,"canonicalKey":64,"locale":8,"draft":6,"navigation":65,"icon":58,"path":66},"Safety & account risk","content:en:1.docs:2.project:1.safety.md","2\u002F1",{"title":62},"\u002Fdocs\u002Fproject\u002Fsafety",{"title":68,"id":69,"canonicalKey":70,"locale":8,"draft":6,"navigation":71,"icon":72,"path":73},"About & credits","content:en:1.docs:2.project:2.about.md","2\u002F2",{"title":68},"lucide:users","\u002Fdocs\u002Fproject\u002Fabout",{"title":75,"page":6,"canonicalKey":76,"locale":8,"id":77,"draft":6,"icon":78,"sidebar":11,"children":79},"For ArenaNet","3","content:en:1.docs:3.upstream:.navigation.yml","lucide:send",[80,87,94,120,146,158,177],{"title":81,"id":82,"canonicalKey":83,"locale":8,"draft":6,"navigation":84,"icon":85,"path":86},"Introduction","content:en:1.docs:3.upstream:1.introduction.md","3\u002F1",{"title":81},"lucide:book-open-check","\u002Fdocs\u002Fupstream\u002Fintroduction",{"title":88,"id":89,"canonicalKey":90,"locale":8,"draft":6,"navigation":91,"icon":92,"path":93},"Request summary","content:en:1.docs:3.upstream:2.request-summary.md","3\u002F2",{"title":88},"lucide:list-checks","\u002Fdocs\u002Fupstream\u002Frequest-summary",{"title":95,"page":6,"canonicalKey":96,"locale":8,"id":97,"draft":6,"icon":98,"sidebar":59,"children":99},"File system","3\u002F3","content:en:1.docs:3.upstream:3.filesystem:.navigation.yml","lucide:folder-x",[100,106,113],{"title":101,"id":102,"canonicalKey":103,"locale":8,"draft":6,"navigation":104,"icon":98,"path":105},"File routines (UR-01…04)","content:en:1.docs:3.upstream:3.filesystem:1.unimplemented-routines.md","3\u002F3\u002F1",{"title":101},"\u002Fdocs\u002Fupstream\u002Ffilesystem\u002Funimplemented-routines",{"title":107,"id":108,"canonicalKey":109,"locale":8,"draft":6,"navigation":110,"icon":111,"path":112},"RemoveExtension (UR-05)","content:en:1.docs:3.upstream:3.filesystem:2.path-remove-extension.md","3\u002F3\u002F2",{"title":107},"lucide:scissors","\u002Fdocs\u002Fupstream\u002Ffilesystem\u002Fpath-remove-extension",{"title":114,"id":115,"canonicalKey":116,"locale":8,"draft":6,"navigation":117,"icon":118,"path":119},"File::Open mode (UR-06)","content:en:1.docs:3.upstream:3.filesystem:3.file-open-mode.md","3\u002F3\u002F3",{"title":114},"lucide:file-plus-2","\u002Fdocs\u002Fupstream\u002Ffilesystem\u002Ffile-open-mode",{"title":121,"page":6,"canonicalKey":122,"locale":8,"id":123,"draft":6,"icon":124,"sidebar":59,"children":125},"Input","3\u002F4","content:en:1.docs:3.upstream:4.input:.navigation.yml","lucide:mouse-pointer-click",[126,132,139],{"title":127,"id":128,"canonicalKey":129,"locale":8,"draft":6,"navigation":130,"icon":124,"path":131},"Double-click (UR-07)","content:en:1.docs:3.upstream:4.input:1.double-click-flag.md","3\u002F4\u002F1",{"title":127},"\u002Fdocs\u002Fupstream\u002Finput\u002Fdouble-click-flag",{"title":133,"id":134,"canonicalKey":135,"locale":8,"draft":6,"navigation":136,"icon":137,"path":138},"Key labels (UR-08)","content:en:1.docs:3.upstream:4.input:2.key-labels.md","3\u002F4\u002F2",{"title":133},"lucide:keyboard","\u002Fdocs\u002Fupstream\u002Finput\u002Fkey-labels",{"title":140,"id":141,"canonicalKey":142,"locale":8,"draft":6,"navigation":143,"icon":144,"path":145},"Cursor re-test (UR-09)","content:en:1.docs:3.upstream:4.input:3.cursor-re-evaluation.md","3\u002F4\u002F3",{"title":140},"lucide:pointer","\u002Fdocs\u002Fupstream\u002Finput\u002Fcursor-re-evaluation",{"title":147,"page":6,"canonicalKey":148,"locale":8,"id":149,"draft":6,"icon":150,"sidebar":59,"children":151},"Runtime","3\u002F5","content:en:1.docs:3.upstream:5.runtime:.navigation.yml","lucide:cpu",[152],{"title":153,"id":154,"canonicalKey":155,"locale":8,"draft":6,"navigation":156,"icon":150,"path":157},"Heap maximum (UR-10)","content:en:1.docs:3.upstream:5.runtime:1.heap-maximum.md","3\u002F5\u002F1",{"title":153},"\u002Fdocs\u002Fupstream\u002Fruntime\u002Fheap-maximum",{"title":159,"page":6,"canonicalKey":160,"locale":8,"id":161,"draft":6,"icon":162,"sidebar":59,"children":163},"Interface proposals","3\u002F6","content:en:1.docs:3.upstream:6.proposals:.navigation.yml","lucide:plug",[164,171],{"title":165,"id":166,"canonicalKey":167,"locale":8,"draft":6,"navigation":168,"icon":169,"path":170},"Build identity (UR-11)","content:en:1.docs:3.upstream:6.proposals:1.build-identification.md","3\u002F6\u002F1",{"title":165},"lucide:fingerprint","\u002Fdocs\u002Fupstream\u002Fproposals\u002Fbuild-identification",{"title":172,"id":173,"canonicalKey":174,"locale":8,"draft":6,"navigation":175,"icon":162,"path":176},"Host interface (UR-12)","content:en:1.docs:3.upstream:6.proposals:2.platform-host-interface.md","3\u002F6\u002F2",{"title":172},"\u002Fdocs\u002Fupstream\u002Fproposals\u002Fplatform-host-interface",{"title":178,"page":6,"canonicalKey":179,"locale":8,"id":180,"draft":6,"icon":181,"sidebar":59,"children":182},"Reference","3\u002F7","content:en:1.docs:3.upstream:7.reference:.navigation.yml","lucide:microscope",[183,189],{"title":184,"id":185,"canonicalKey":186,"locale":8,"draft":6,"navigation":187,"icon":52,"path":188},"Our workarounds","content:en:1.docs:3.upstream:7.reference:1.our-workarounds.md","3\u002F7\u002F1",{"title":184},"\u002Fdocs\u002Fupstream\u002Freference\u002Four-workarounds",{"title":190,"id":191,"canonicalKey":192,"locale":8,"draft":6,"navigation":193,"icon":181,"path":194},"Verification method","content:en:1.docs:3.upstream:7.reference:2.verification-method.md","3\u002F7\u002F2",{"title":190},"\u002Fdocs\u002Fupstream\u002Freference\u002Fverification-method",{"title":196,"ref":197,"description":198,"icon":118,"updated":199,"navigation":200,"body":201,"type":587,"id":115,"canonicalKey":116,"draft":6,"partial":6,"locale":8,"collection":588,"navigationFile":6,"file":589,"route":595,"resolution":599},"UR-06: File::Open mode 1 creates the file it tests for","docs\u002Fupstream\u002Ffilesystem\u002Ffile-open-mode","Mode 1 is the open-an-existing-file mode, but it carries O_CREAT. The rename probe therefore creates the destination file and reports the name as taken.","2026-08-04",{"title":114},{"type":202,"children":203,"toc":570},"root",[204,225,237,254,264,269,282,289,301,330,348,353,359,391,397,413,419,427,432,453,459,508,514,553,559],{"type":205,"tag":206,"props":207,"children":208},"element","p",{},[209,216,218,223],{"type":205,"tag":210,"props":211,"children":212},"code",{},[213],{"type":214,"value":215},"text","File::Open",{"type":214,"value":217}," mode 1 is supposed to open a file that exists and fail when it's\nabsent. Today it carries ",{"type":205,"tag":210,"props":219,"children":220},{},[221],{"type":214,"value":222},"O_CREAT",{"type":214,"value":224},", so it creates the file instead.",{"type":205,"tag":206,"props":226,"children":227},{},[228,230,235],{"type":214,"value":229},"Build used for the measurements below:\n",{"type":205,"tag":210,"props":231,"children":232},{},[233],{"type":214,"value":234},"b0319704f3072d6948a66026a35af5eb0af12b48d70986783c293e7c77e98483",{"type":214,"value":236},".",{"type":205,"tag":206,"props":238,"children":239},{},[240,246,248,253],{"type":205,"tag":241,"props":242,"children":243},"strong",{},[244],{"type":214,"value":245},"Function 771",{"type":214,"value":247},", ",{"type":205,"tag":210,"props":249,"children":250},{},[251],{"type":214,"value":252},"File::Open(path, mode, err) -> handle",{"type":214,"value":236},{"type":205,"tag":206,"props":255,"children":256},{},[257,262],{"type":205,"tag":241,"props":258,"children":259},{},[260],{"type":214,"value":261},"Fix:",{"type":214,"value":263}," low effort, medium blast radius — the change is one flag in the mode\ntable, but every mode 1 caller changes behaviour. Code that depends on the\ncurrent create-on-open breaks; that's the correct outcome, but the mode 1\ncallers need a check. We identified two: function 9753 (template read) and\nfunction 9757 (rename probe).",{"type":205,"tag":206,"props":265,"children":266},{},[267],{"type":214,"value":268},"Mode 1 is the open-an-existing-file mode. Function 9753 uses it to read a\ntemplate, and function 9757 uses it to ask whether a rename destination is\nalready taken:",{"type":205,"tag":270,"props":271,"children":275},"pre",{"language":272,"class":273,"tabindex":274},"c","shiki dark:dark-plus","0",[276],{"type":205,"tag":210,"props":277,"children":279},{"class":278},"language-c",[280],{"type":214,"value":281},"if (!allowOverwrite) {\n    handle = File::Open(path, 1, NULL);\n    if (handle) return false;          \u002F\u002F the name is already in use\n}\nhandle = File::Open(path, 2, NULL);    \u002F\u002F create and write",{"type":205,"tag":283,"props":284,"children":286},"h2",{"id":285},"what-the-client-does-now",[287],{"type":214,"value":288},"What the client does now",{"type":205,"tag":206,"props":290,"children":291},{},[292,294,299],{"type":214,"value":293},"Both modes reach ",{"type":205,"tag":210,"props":295,"children":296},{},[297],{"type":214,"value":298},"openat",{"type":214,"value":300}," with identical flags. We captured a save and then a\nrename on a live client:",{"type":205,"tag":270,"props":302,"children":304},{"language":214,"class":303,"tabindex":274},"shiki shiki-themes light-plus dark-plus dark:dark-plus",[305],{"type":205,"tag":210,"props":306,"children":308},{"class":307},"language-text",[309,320,322],{"type":205,"tag":310,"props":311,"children":314},"span",{"class":312,"style":313},"line","display: inline",[315],{"type":205,"tag":310,"props":316,"children":317},{},[318],{"type":214,"value":319},"save    openat flags:32834 access:2 create:true errno:0 -> fd_pwrite 24\u002F24 -> fd_close",{"type":214,"value":321},"\n",{"type":205,"tag":310,"props":323,"children":324},{"class":312,"style":313},[325],{"type":205,"tag":310,"props":326,"children":327},{},[328],{"type":214,"value":329},"rename  openat flags:32834 access:2 create:true errno:0 -> fd_close",{"type":205,"tag":206,"props":331,"children":332},{},[333,335,340,342,347],{"type":214,"value":334},"The value ",{"type":205,"tag":210,"props":336,"children":337},{},[338],{"type":214,"value":339},"32834",{"type":214,"value":341}," is ",{"type":205,"tag":210,"props":343,"children":344},{},[345],{"type":214,"value":346},"O_RDWR | O_CREAT | O_LARGEFILE",{"type":214,"value":236},{"type":205,"tag":206,"props":349,"children":350},{},[351],{"type":214,"value":352},"Mode 1 therefore creates the very file it's testing for — the probe then sees\nthat the file exists and reports the name as taken.",{"type":205,"tag":283,"props":354,"children":356},{"id":355},"what-the-player-sees",[357],{"type":214,"value":358},"What the player sees",{"type":205,"tag":360,"props":361,"children":362},"ul",{},[363,369,381,386],{"type":205,"tag":364,"props":365,"children":366},"li",{},[367],{"type":214,"value":368},"Every rename fails, for every destination name.",{"type":205,"tag":364,"props":370,"children":371},{},[372,374,380],{"type":214,"value":373},"The client shows ",{"type":205,"tag":375,"props":376,"children":377},"em",{},[378],{"type":214,"value":379},"\"The attempt to rename the Skills Template named … failed\"",{"type":214,"value":236},{"type":205,"tag":364,"props":382,"children":383},{},[384],{"type":214,"value":385},"A file of zero length stays at the destination path.",{"type":205,"tag":364,"props":387,"children":388},{},[389],{"type":214,"value":390},"A load of an absent template creates an empty file instead of a failure.",{"type":205,"tag":283,"props":392,"children":394},{"id":393},"expected-behaviour",[395],{"type":214,"value":396},"Expected behaviour",{"type":205,"tag":206,"props":398,"children":399},{},[400,402,406,408,412],{"type":214,"value":401},"Mode 1 opens an existing file, without ",{"type":205,"tag":210,"props":403,"children":404},{},[405],{"type":214,"value":222},{"type":214,"value":407},", and fails when the file is\nabsent. Mode 2 keeps ",{"type":205,"tag":210,"props":409,"children":410},{},[411],{"type":214,"value":222},{"type":214,"value":236},{"type":205,"tag":283,"props":414,"children":416},{"id":415},"proposed-mode-table",[417],{"type":214,"value":418},"Proposed mode table",{"type":205,"tag":270,"props":420,"children":421},{"language":272,"class":273,"tabindex":274},[422],{"type":205,"tag":210,"props":423,"children":424},{"class":278},[425],{"type":214,"value":426},"\u002F\u002F File::Open(path, mode, err)\n\u002F\u002F\n\u002F\u002F mode 1  open existing    O_RDONLY  (or O_RDWR)      no O_CREAT\n\u002F\u002F mode 2  create and write O_RDWR | O_CREAT | O_TRUNC",{"type":205,"tag":206,"props":428,"children":429},{},[430],{"type":214,"value":431},"We don't know the full mode table. We report modes 1 and 2 only, because those\nare the two the template paths use.",{"type":205,"tag":433,"props":434,"children":436},"info",{"title":435},"Check for a read-only mount",[437,439,444,446,451],{"type":214,"value":438},"If a mode 1 open uses ",{"type":205,"tag":210,"props":440,"children":441},{},[442],{"type":214,"value":443},"O_RDWR",{"type":214,"value":445}," today, switching to ",{"type":205,"tag":210,"props":447,"children":448},{},[449],{"type":214,"value":450},"O_RDONLY",{"type":214,"value":452}," also changes\nbehaviour on a read-only file. Either choice works with our acceptance\ncriteria — just decide which one you want.",{"type":205,"tag":283,"props":454,"children":456},{"id":455},"acceptance-criteria",[457],{"type":214,"value":458},"Acceptance criteria",{"type":205,"tag":360,"props":460,"children":461},{},[462,472,484,493,498,503],{"type":205,"tag":364,"props":463,"children":464},{},[465,470],{"type":205,"tag":210,"props":466,"children":467},{},[468],{"type":214,"value":469},"File::Open(L\"Templates\u002FSkills\u002FAbsent.txt\", 1, NULL)",{"type":214,"value":471}," returns a null handle.",{"type":205,"tag":364,"props":473,"children":474},{},[475,477,482],{"type":214,"value":476},"After that call, ",{"type":205,"tag":210,"props":478,"children":479},{},[480],{"type":214,"value":481},"Templates\u002FSkills\u002FAbsent.txt",{"type":214,"value":483}," does not exist.",{"type":205,"tag":364,"props":485,"children":486},{},[487,491],{"type":205,"tag":210,"props":488,"children":489},{},[490],{"type":214,"value":215},{"type":214,"value":492}," mode 2 on the same path creates the file, as it does today.",{"type":205,"tag":364,"props":494,"children":495},{},[496],{"type":214,"value":497},"A rename to an unused name completes.",{"type":205,"tag":364,"props":499,"children":500},{},[501],{"type":214,"value":502},"A rename to a used name fails, and the existing file stays unchanged.",{"type":205,"tag":364,"props":504,"children":505},{},[506],{"type":214,"value":507},"A load of an absent template fails and creates no file.",{"type":205,"tag":283,"props":509,"children":511},{"id":510},"how-to-reproduce",[512],{"type":214,"value":513},"How to reproduce",{"type":205,"tag":515,"props":516,"children":518},"steps",{"mode":517},"numbered",[519,526,531,537,542,548],{"type":205,"tag":520,"props":521,"children":523},"h3",{"id":522},"how-to-reproduce-prepare-a-template",[524],{"type":214,"value":525},"Prepare a template",{"type":205,"tag":206,"props":527,"children":528},{},[529],{"type":214,"value":530},"Use a build in which the save path works. Save one template.",{"type":205,"tag":520,"props":532,"children":534},{"id":533},"how-to-reproduce-rename-it",[535],{"type":214,"value":536},"Rename it",{"type":205,"tag":206,"props":538,"children":539},{},[540],{"type":214,"value":541},"Rename the template to any unused name. The rename fails.",{"type":205,"tag":520,"props":543,"children":545},{"id":544},"how-to-reproduce-look-at-the-directory",[546],{"type":214,"value":547},"Look at the directory",{"type":205,"tag":206,"props":549,"children":550},{},[551],{"type":214,"value":552},"A file of zero length is now at the destination name.",{"type":205,"tag":283,"props":554,"children":556},{"id":555},"our-workaround-today",[557],{"type":214,"value":558},"Our workaround today",{"type":205,"tag":206,"props":560,"children":561},{},[562,564,568],{"type":214,"value":563},"The host adds a forwarder for the probe call site only. It asks the host\nwhether the file exists and calls the real ",{"type":205,"tag":210,"props":565,"children":566},{},[567],{"type":214,"value":215},{"type":214,"value":569}," only when it does; the\nwrite call site and the load path keep the real function. A corrected mode\ntable retires the forwarder.",{"title":571,"searchDepth":572,"depth":572,"links":573},"",4,[574,576,577,578,579,580,586],{"id":285,"depth":575,"text":288},2,{"id":355,"depth":575,"text":358},{"id":393,"depth":575,"text":396},{"id":415,"depth":575,"text":418},{"id":455,"depth":575,"text":458},{"id":510,"depth":575,"text":513,"children":581},[582,584,585],{"id":522,"depth":583,"text":525},3,{"id":533,"depth":583,"text":536},{"id":544,"depth":583,"text":547},{"id":555,"depth":575,"text":558},"markdown","docs",{"source":590,"path":591,"stem":592,"dir":593,"extension":594},"content","en\u002F1.docs\u002F3.upstream\u002F3.filesystem\u002F3.file-open-mode.md","en\u002F1.docs\u002F3.upstream\u002F3.filesystem\u002F3.file-open-mode","filesystem","md",{"requestedPath":119,"resolvedPath":119,"alternates":596},[597],{"locale":8,"path":119,"source":598},"variant",{"requested":600,"resolved":601,"usedFallback":6},{"locale":8},{"locale":8},{"previous":603,"next":605},{"title":107,"id":108,"canonicalKey":109,"locale":8,"draft":6,"navigation":604,"path":112},{"title":107},{"title":127,"id":128,"canonicalKey":129,"locale":8,"draft":6,"navigation":606,"path":131},{"title":127},{"left":608,"top":608,"width":609,"height":609,"rotate":608,"vFlip":6,"hFlip":6,"body":610},0,24,"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"\u002F>\u003Cpath d=\"M14 2v5a1 1 0 0 0 1 1h5\"\u002F>\u003C\u002Fg>",{"left":608,"top":608,"width":609,"height":609,"rotate":608,"vFlip":6,"hFlip":6,"body":612},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Crect width=\"8\" height=\"4\" x=\"8\" y=\"2\" rx=\"1\" ry=\"1\"\u002F>\u003Cpath d=\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\"\u002F>\u003C\u002Fg>",1786362927910]