2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-29 13:28:19 +00:00

retain the filename the profile was loaded from and use that when writting it back out

This commit is contained in:
John Johansen 2008-04-18 21:01:10 +00:00
parent f213706f17
commit e43a4769be

View File

@ -875,7 +875,11 @@ sub getprofilefilename ($) {
my $profile = shift;
my $filename = $profile;
$filename =~ s/\///; # strip leading /
if ($filename =~ /^\//) {
$filename =~ s/^\///; # strip leading /
} else {
$filename = "profile_$filename";
}
$filename =~ s/\//./g; # convert /'s to .'s
return "$profiledir/$filename";