소스 검색

Windows open() returns eacces when eisdir would be sane

Nick Mathewson 7 년 전
부모
커밋
aa05dea5ff
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/test/test_shared_random.c

+ 5 - 1
src/test/test_shared_random.c

@@ -638,7 +638,11 @@ test_state_load_from_disk(void *arg)
 
   /* Try to load the directory itself. Should fail. */
   ret = disk_state_load_from_disk_impl(dir);
-  tt_assert(ret == -EISDIR);
+#ifdef _WIN32
+  tt_int_op(ret, OP_EQ, -EACCES);
+#else
+  tt_int_op(ret, OP_EQ, -EISDIR);
+#endif
 
   /* State should be non-existent at this point. */
   the_sr_state = get_sr_state();