use corrent path for new files
This commit is contained in:
parent
c423676180
commit
dab7c18321
1 changed files with 1 additions and 1 deletions
|
@ -178,7 +178,7 @@ func scan(ctx context.Context, id string, full bool) {
|
||||||
// File Does not Exist Yet
|
// File Does not Exist Yet
|
||||||
|
|
||||||
slog.InfoContext(ctx, "File is New", "path", fullPath)
|
slog.InfoContext(ctx, "File is New", "path", fullPath)
|
||||||
_, err = tx.Exec(ctx, "INSERT INTO files (library_id, path, size, status, health, md5) VALUES ($1, $2, $3, $4, $5, $6)", id, fullPath, info.Size(), constants.FILE_STATUS_EXISTS, constants.FILE_HEALTH_UNKNOWN, newMD5)
|
_, err = tx.Exec(ctx, "INSERT INTO files (library_id, path, size, status, health, md5) VALUES ($1, $2, $3, $4, $5, $6)", id, fPath, info.Size(), constants.FILE_STATUS_EXISTS, constants.FILE_HEALTH_UNKNOWN, newMD5)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Add New File to DB: %w", err)
|
return fmt.Errorf("Add New File to DB: %w", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue