Hi!

Suppose you write data to orig.sobj, and then you create a symbolic link
copy.sobj to orig.sobj. If you now save data under the name copy.sobj,
then the data in orig.sobj get overridden:

        sage: d = tmp_dir()
        sage: save(1, os.path.join(d, 'orig'))
        sage: os.symlink(os.path.join(d, 'orig.sobj'), os.path.join(d, 
'copy.sobj'))
        sage: save(2, os.path.join(d, 'copy.sobj'))
        sage: load(os.path.join(d, 'orig.sobj'))
        2
        sage: load(os.path.join(d, 'copy.sobj'))
        2
        sage: os.path.islink(os.path.join(d, 'copy.sobj'))
        True

Do you agree that this is a bug?

I would expect that saving data into a file named copy.sobj would override
the symbolic link that previously existed under the name copy.sobj, so that
in the end copy.sobj would not be a link, and so that the file orig.sobj
pointed at by the symbolic link would not be touched.

Best regards,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to