You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/opencode/src/file/time.ts
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,8 @@ export namespace FileTime {
61
61
consttime=get(sessionID,filepath)
62
62
if(!time)thrownewError(`You must read file ${filepath} before overwriting it. Use the Read tool first`)
63
63
constmtime=Filesystem.stat(filepath)?.mtime
64
-
if(mtime&&mtime.getTime()>time.getTime()){
64
+
// Allow a 50ms tolerance for Windows NTFS timestamp fuzziness / async flushing
65
+
if(mtime&&mtime.getTime()>time.getTime()+50){
65
66
thrownewError(
66
67
`File ${filepath} has been modified since it was last read.\nLast modification: ${mtime.toISOString()}\nLast read: ${time.toISOString()}\n\nPlease read the file again before modifying it.`,
0 commit comments