mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-11 07:30:56 +00:00
remove warning on open by fixing order of chown
fix #369 (completes #324)
This commit is contained in:
parent
bec53aeb72
commit
377e335e93
5
tomb
5
tomb
@ -2195,14 +2195,15 @@ change_tomb_key() {
|
|||||||
# {{{ Open
|
# {{{ Open
|
||||||
|
|
||||||
_update_control_file() {
|
_update_control_file() {
|
||||||
# replaces a control file with new contents and gives it user ownership
|
# make sure a control file exists, gives it user ownership
|
||||||
|
# and replaces it with new contents
|
||||||
# stdin = contents
|
# stdin = contents
|
||||||
# $1 = path to control file
|
# $1 = path to control file
|
||||||
# $2 = contents
|
# $2 = contents
|
||||||
[[ "$2" = "" ]] && return 1
|
[[ "$2" = "" ]] && return 1
|
||||||
_sudo touch "$1"
|
_sudo touch "$1"
|
||||||
print "$2" > "$1"
|
|
||||||
_sudo chown ${_UID}:${_GID} "$1"
|
_sudo chown ${_UID}:${_GID} "$1"
|
||||||
|
print "$2" > "$1"
|
||||||
_verbose "updated control file $1 = $2"
|
_verbose "updated control file $1 = $2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user