mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-19 14:36:38 -05:00
Fix error when configuring a contentfile in / (#18)
When using this config line: content /snapraid.content SnapRAID throws this error: Error accessing 'content' dir '' specification in '/etc/snapraid.conf' at line 17 This commit fixes that by not replacing the rightmost slash with NUL but instead the char immediately after the slash.
This commit is contained in:
parent
aa04edeccc
commit
978d812153
1 changed files with 1 additions and 1 deletions
|
|
@ -855,7 +855,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
|
|||
pathimport(device, sizeof(device), buffer);
|
||||
slash = strrchr(device, '/');
|
||||
if (slash)
|
||||
*slash = 0;
|
||||
*(slash + 1) = 0;
|
||||
else
|
||||
pathcpy(device, sizeof(device), ".");
|
||||
if (stat(device, &st) == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue