Added open support in OS X.
This commit is contained in:
parent
7c1825d1b2
commit
639160bc75
1 changed files with 7 additions and 1 deletions
|
@ -48,6 +48,12 @@
|
|||
|
||||
#define sha1 SHA1
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define OPEN_BIN "open %s"
|
||||
#else
|
||||
#define OPEN_BIN "xdg-open %s"
|
||||
#endif
|
||||
|
||||
char *get_downloads_directory (void);
|
||||
int verbosity;
|
||||
extern int offline_mode;
|
||||
|
@ -1777,7 +1783,7 @@ void end_load (struct download *D) {
|
|||
logprintf ("Done: %s\n", D->name);
|
||||
} else if (D->next == 2) {
|
||||
static char buf[1000];
|
||||
sprintf (buf, "xdg-open %s", D->name);
|
||||
sprintf (buf, OPEN_BIN, D->name);
|
||||
int x = system (buf);
|
||||
if (x < 0) {
|
||||
logprintf ("Can not open image viewer: %m\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue