Skip to content

Commit

Permalink
share: display the created share name
Browse files Browse the repository at this point in the history
There's a certain amount of confusion by the fact that lpass insists
on forcing the Shared-XXX filename convention, so users can't find
the shared folder they just created.  Make it a little more obvious
by telling the folder name that was ultimately created.

Signed-off-by: Bob Copeland <[email protected]>
  • Loading branch information
Bob Copeland committed Feb 23, 2017
1 parent 9432202 commit 64553a3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cmd-share.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,22 @@ static int share_limit(struct share_command *cmd, int argc, char **argv,
static int share_create(struct share_command *cmd, int argc, char **argv,
struct share_args *args)
{
int ret;
bool prepend_share;

if (argc != 0)
die_share_usage(cmd);

UNUSED(argv);

lastpass_share_create(args->session, args->sharename);
ret = lastpass_share_create(args->session, args->sharename);
if (ret)
die("No permission to create share");

prepend_share = strncmp(args->sharename, "Shared-", 7);
terminal_printf("Folder %s%s created.\n",
(prepend_share) ? "Shared-" : "",
args->sharename);
return 0;
}

Expand Down

0 comments on commit 64553a3

Please sign in to comment.