are the paths of preferences for the old and the new version, corresponding to the paths that were passed to
is a name of the flag to use to record in the registry that the copy is already done.
must be a valid registry value name on Windows, and a valid filename on all other platforms. The default value of
is the string
copy-preferences-from-older-versionis already executing (in another thread), and if so it just waits for the other call to finish.
Then if all the checks above indicate that copying is still needed,
copies the values from the tree below
to a tree below
. It traverses the entire tree below
, and checks each key to see if it has any values.
For a key that has values, it checks if the key exists under new-path , and if the key exists it does not copy any of the values for this key, though it still traverses and maybe copies its subkeys. If the key does not exist under new-path , it creates the key and copies the values.