diff --git a/cmdline/state.c b/cmdline/state.c index e8333a0f..d69a1777 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -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) {