path: allow starting MPD with non-existing music directory
When the music directory is not mounted yet, let MPD start anyway.
This commit is contained in:
		
							
								
								
									
										12
									
								
								src/path.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								src/path.c
									
									
									
									
									
								
							@@ -115,18 +115,18 @@ void initPaths(void)
 | 
				
			|||||||
	playlist_dir_len = strlen(playlistDir);
 | 
						playlist_dir_len = strlen(playlistDir);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((dir = opendir(playlistDir)) == NULL) {
 | 
						if ((dir = opendir(playlistDir)) == NULL) {
 | 
				
			||||||
		FATAL("cannot open %s \"%s\" (config line %i): %s\n",
 | 
							ERROR("cannot open %s \"%s\" (config line %i): %s\n",
 | 
				
			||||||
		      CONF_PLAYLIST_DIR, playlistParam->value,
 | 
							      CONF_PLAYLIST_DIR, playlistParam->value,
 | 
				
			||||||
		      playlistParam->line, strerror(errno));
 | 
							      playlistParam->line, strerror(errno));
 | 
				
			||||||
	}
 | 
						} else
 | 
				
			||||||
	closedir(dir);
 | 
							closedir(dir);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((dir = opendir(musicDir)) == NULL) {
 | 
						if ((dir = opendir(musicDir)) == NULL) {
 | 
				
			||||||
		FATAL("cannot open %s \"%s\" (config line %i): %s\n",
 | 
							ERROR("cannot open %s \"%s\" (config line %i): %s\n",
 | 
				
			||||||
		      CONF_MUSIC_DIR, musicParam->value,
 | 
							      CONF_MUSIC_DIR, musicParam->value,
 | 
				
			||||||
		      musicParam->line, strerror(errno));
 | 
							      musicParam->line, strerror(errno));
 | 
				
			||||||
	}
 | 
						} else
 | 
				
			||||||
	closedir(dir);
 | 
							closedir(dir);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (fsCharsetParam) {
 | 
						if (fsCharsetParam) {
 | 
				
			||||||
		charset = xstrdup(fsCharsetParam->value);
 | 
							charset = xstrdup(fsCharsetParam->value);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user