diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2013-05-22 09:50:06 +0100 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2013-05-22 09:50:06 +0100 |
commit | 295abb023838c7de9c73ac3d619523b8c910835e (patch) | |
tree | 35bae94ef0cd3b3570c563f8995d27682e5dae23 /install-files.configure | |
parent | 270936ee338155090133aecb36aac1e2cfb543a4 (diff) | |
download | definitions-295abb023838c7de9c73ac3d619523b8c910835e.tar.gz |
Include Lars' suggestions to install-files.configure
Diffstat (limited to 'install-files.configure')
-rwxr-xr-x | install-files.configure | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/install-files.configure b/install-files.configure index 94c213d1..80971093 100755 --- a/install-files.configure +++ b/install-files.configure @@ -81,6 +81,7 @@ class InstallFilesConfigureExtension(cliapp.Application): else: os.mkdir(dest_path, mode) os.chown(dest_path, uid, gid) + os.chmod(dest_path, mode) elif stat.S_ISLNK(mode): if os.path.lexists(dest_path): @@ -93,14 +94,14 @@ class InstallFilesConfigureExtension(cliapp.Application): os.lchown(dest_path, uid, gid) elif stat.S_ISREG(mode): - if os.path.exists(dest_path): + if os.path.lexists(dest_path): raise cliapp.AppException('File already exists at %s' % dest_path) else: shutil.copyfile(os.path.join(manifest_root, './' + path), dest_path) - os.chmod(dest_path, mode) os.chown(dest_path, uid, gid) + os.chmod(dest_path, mode) else: raise cliapp.AppException('Mode given in "%s" is not a file,' |