portablectl: Strip .v or .raw.v when extracting prefix
This allows a plain "portablectl attach foobar.raw.v" without needing to specify a prefix.
This commit is contained in:
committed by
Daan De Meyer
parent
a3ecd774db
commit
23c6ab3971
@@ -142,7 +142,7 @@ static int extract_prefix(const char *path, char **ret) {
|
||||
else {
|
||||
const char *e;
|
||||
|
||||
e = endswith(bn, ".raw");
|
||||
e = ENDSWITH_SET(bn, ".raw.v", ".raw", ".v");
|
||||
if (!e)
|
||||
e = strchr(bn, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user