summaryrefslogtreecommitdiff
blob: 14712f795bd17c57aa714bba3e47668fa50788b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff --git a/library.c b/library.c
index 6b6526e..649738c 100644
--- a/library.c
+++ b/library.c
@@ -315,8 +315,10 @@ int library_import(struct library_t *li, const char *scan, const char *path)
         }
 
         if(execl(scan, "scan", path, NULL) == -1) {
-            perror("execl");
-            exit(-1);
+            if(execlp(scan, "scan", path, NULL) == -1) {
+                perror("execl and execlp");
+                exit(-1);
+            }
         }
 
         abort(); /* execl() does not return */
diff --git a/track.c b/track.c
index 6d28943..38c3e9d 100644
--- a/track.c
+++ b/track.c
@@ -77,8 +77,10 @@ static int start_import(struct track_t *tr, const char *path)
         }
 
         if(execl(tr->importer, "import", path, NULL) == -1) {
-            perror("execl");
-            exit(-1);
+            if(execlp(tr->importer, "import", path, NULL) == -1) {
+                perror("execl and execlp");
+                exit(-1);
+            }
         }
 
         abort(); /* execl() never returns */