File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -57,16 +57,24 @@ function onStartDaemon (node) {
57
57
// not to be exiting correctly, hence the file is not
58
58
// removed.
59
59
const lockPath = join ( config . settingsStore . get ( 'ipfsPath' ) , 'repo.lock' )
60
+ const apiPath = join ( config . settingsStore . get ( 'ipfsPath' ) , 'api' )
60
61
61
62
if ( fs . existsSync ( lockPath ) ) {
62
63
try {
63
64
fs . unlinkSync ( lockPath )
64
- fs . unlinkSync ( join ( config . settingsStore . get ( 'ipfsPath' ) , 'api' ) )
65
65
} catch ( e ) {
66
66
debug ( 'Could not remove lock. Daemon might be running.' )
67
67
}
68
68
}
69
69
70
+ if ( fs . existsSync ( apiPath ) ) {
71
+ try {
72
+ fs . unlinkSync ( apiPath )
73
+ } catch ( e ) {
74
+ debug ( 'Could not remove API file. Daemon might be running.' )
75
+ }
76
+ }
77
+
70
78
const flags = [ ]
71
79
if ( config . settingsStore . get ( 'dhtClient' ) ) {
72
80
flags . push ( '--routing=dhtclient' )
You can’t perform that action at this time.
0 commit comments