mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-08-03 09:55:57 -04:00
refactor: Remove unnecessary upperdir realpath
The explicit resolution of the upper directory path using `realpath()` is not required before passing it to `read_dirs` since `direct_load_data_source()` already does it. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
5e7f7d756e
commit
02a3582501
12
main.c
12
main.c
@ -5755,18 +5755,6 @@ main (int argc, char *argv[])
|
||||
if (lo.mountpoint == NULL)
|
||||
error (EXIT_FAILURE, 0, "no mountpoint specified");
|
||||
|
||||
if (lo.upperdir != NULL)
|
||||
{
|
||||
cleanup_free char *full_path = NULL;
|
||||
|
||||
full_path = realpath (lo.upperdir, NULL);
|
||||
if (full_path == NULL)
|
||||
error (EXIT_FAILURE, errno, "cannot retrieve path for %s", lo.upperdir);
|
||||
|
||||
lo.upperdir = strdup (full_path);
|
||||
if (lo.upperdir == NULL)
|
||||
error (EXIT_FAILURE, errno, "cannot allocate memory");
|
||||
}
|
||||
|
||||
set_limits ();
|
||||
check_can_mknod (&lo);
|
||||
|
Loading…
x
Reference in New Issue
Block a user