File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ fn build_rocksdb() {
171171 config. define ( "_MBCS" , None ) ;
172172 config. define ( "WIN64" , None ) ;
173173 config. define ( "NOMINMAX" , None ) ;
174- config. define ( "WITH_WINDOWS_UTF8_FILENAMES " , "ON" ) ;
174+ config. define ( "ROCKSDB_WINDOWS_UTF8_FILENAMES " , None ) ;
175175
176176 if & target == "x86_64-pc-windows-gnu" {
177177 // Tell MinGW to create localtime_r wrapper of localtime_s function.
Original file line number Diff line number Diff line change @@ -618,6 +618,23 @@ fn test_open_with_multiple_refs_as_single_threaded() {
618618 t. compile_fail ( "tests/fail/open_with_multiple_refs_as_single_threaded.rs" ) ;
619619}
620620
621+ #[ test]
622+ fn test_open_utf8_path ( ) {
623+ let path = DBPath :: new ( "_rust_rocksdb_utf8_path_temporärer_Ordner" ) ;
624+
625+ {
626+ let db = DB :: open_default ( & path) . unwrap ( ) ;
627+
628+ assert ! ( db. put( b"k1" , b"v1111" ) . is_ok( ) ) ;
629+
630+ let r: Result < Option < Vec < u8 > > , Error > = db. get ( b"k1" ) ;
631+
632+ assert_eq ! ( r. unwrap( ) . unwrap( ) , b"v1111" ) ;
633+ assert ! ( db. delete( b"k1" ) . is_ok( ) ) ;
634+ assert ! ( db. get( b"k1" ) . unwrap( ) . is_none( ) ) ;
635+ }
636+ }
637+
621638#[ test]
622639fn compact_range_test ( ) {
623640 let path = DBPath :: new ( "_rust_rocksdb_compact_range_test" ) ;
You can’t perform that action at this time.
0 commit comments