Skip to content

Commit

Permalink
Custom mount options
Browse files Browse the repository at this point in the history
  • Loading branch information
phpony authored Jan 23, 2024
1 parent c9225cb commit ed195f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Gocrypt.vala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Cryptor {
}
}

public static void mount_vault (string path, string mountpoint, string password, bool ro, bool reverse) throws Error {
public static void mount_vault (string path, string mountpoint, string password, bool ro, bool reverse, string custom_options) throws Error {
string standard_error;
int status;

Expand All @@ -39,6 +39,9 @@ namespace Cryptor {
if (reverse) {
cmd += "-reverse ";
}
if (custom_options != null && custom_options != "") {
cmd += custom_options + " ";
}
cmd += " -passfile " + pfile.get_path () + " -- " + path + " " + mountpoint;
try {
Process.spawn_command_line_sync (cmd, null, out standard_error, out status);
Expand Down

0 comments on commit ed195f1

Please sign in to comment.