]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- canonicalize subvolume
authorArvin Schnell <aschnell@suse.de>
Thu, 4 Aug 2011 15:55:37 +0000 (17:55 +0200)
committerArvin Schnell <aschnell@suse.de>
Thu, 4 Aug 2011 15:55:37 +0000 (17:55 +0200)
tools/snapper.cc

index 2069e63138d2d1aaf1b65f57a67f34f3f0b60479..17ec67407aa633db5973e3725b0f6922925b35f0 100644 (file)
@@ -131,7 +131,12 @@ command_create_config()
        exit(EXIT_FAILURE);
     }
 
-    string subvolume = getopts.popArg();
+    string subvolume = realpath(getopts.popArg());
+    if (subvolume.empty())
+    {
+       cerr << _("Invalid subvolume.") << endl;
+       exit(EXIT_FAILURE);
+    }
 
     string fstype = "";
     string template_name = "default";