Commit Diff


commit - 9b31ed6506b8e65348a504355903c213b90125d4
commit + 84bf00a657aa272bf25d00785cfc8302c60e2fca
blob - cd73d64938ac740ddedd0e9b1c56c84ea4fb5fe4
blob + 2f9c113310bf9ff778c1c37fce014a3a4b984b2f
--- lib/worktree.c
+++ lib/worktree.c
@@ -3872,7 +3872,10 @@ schedule_addition(void *arg, unsigned char status, uns
 	}
 
 	if (status != GOT_STATUS_UNVERSIONED) {
-		err = got_error_path(ondisk_path, GOT_ERR_FILE_STATUS);
+		if (status == GOT_STATUS_NONEXISTENT)
+			err = got_error_set_errno(ENOENT, ondisk_path);
+		else
+			err = got_error_path(ondisk_path, GOT_ERR_FILE_STATUS);
 		goto done;
 	}