Skip to content

Commit da70072

Browse files
authored
Fix restore user with custom content in home dir
Rearranged the order of execution to fix the error occurring when restoring a user with custom content in home dir.
1 parent 2588413 commit da70072

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/v-restore-user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,8 +778,8 @@ if [ "$udir" != 'no' ]; then
778778

779779
chown "$user" "$tmpdir/user_dir"
780780
chown "$user" "$HOMEDIR/$user"
781-
chown "$user" "$HOMEDIR/$user/$user_dir"
782781
$BIN/v-extract-fs-archive "$user" "$tmpdir/user_dir/$user_dir.tar.gz" "$HOMEDIR/$user"
782+
chown "$user" "$HOMEDIR/$user/$user_dir"
783783
cmdstatus="$?"
784784
chown root:root "$HOMEDIR/$user"
785785
if [ "$cmdstatus" -ne 0 ]; then

0 commit comments

Comments
 (0)