@@ -637,6 +637,24 @@ def test_wallet_with_path_ending_in_slash(self):
637637
638638 assert_equal (bals , wallet .getbalances ())
639639
640+ def test_wallet_with_path_ending_in_relative_specifier (self ):
641+ self .log .info ("Test migrating a wallet with a name/path ending in a relative specifier, '..'" )
642+ wallet_ending_in_relative = "path/that/ends/in/.."
643+ # the wallet data is actually inside of path/that/ends/
644+ wallet = self .create_legacy_wallet (wallet_ending_in_relative )
645+ default = self .master_node .get_wallet_rpc (self .default_wallet_name )
646+
647+ addr = wallet .getnewaddress ()
648+ txid = default .sendtoaddress (addr , 1 )
649+ self .generate (self .master_node , 1 )
650+ bals = wallet .getbalances ()
651+
652+ _ , wallet = self .migrate_and_get_rpc (wallet_ending_in_relative )
653+
654+ assert wallet .gettransaction (txid )
655+
656+ assert_equal (bals , wallet .getbalances ())
657+
640658 def test_default_wallet (self ):
641659 self .log .info ("Test migration of the wallet named as the empty string" )
642660 wallet = self .create_legacy_wallet ("" )
@@ -1529,6 +1547,7 @@ def run_test(self):
15291547 self .test_unloaded_by_path ()
15301548 self .test_wallet_with_relative_path ()
15311549 self .test_wallet_with_path_ending_in_slash ()
1550+ self .test_wallet_with_path_ending_in_relative_specifier ()
15321551 self .test_default_wallet ()
15331552 self .test_direct_file ()
15341553 self .test_addressbook ()
0 commit comments