cloudify-cosmo / repex

sed on steroids
Apache License 2.0
10 stars 3 forks source link

File attributes are not kept after a replacement #20

Closed nir0s closed 8 years ago

nir0s commented 8 years ago

The files are being recreated and their ownership and permissions are not kept. This should be fixed.

os.stat can be used to retrieve permissions. os.chown(path, uid, gid) can be used to redo ownership.

nir0s commented 8 years ago

29 solves this. The solution was eventually to copy the file for replacement before replacing which keeps the attributes of that file.