Files
zerobyte/app/client/lib/volume-path.ts
Nico 8fcd446926 refactor: snapshot strip out base path (#542)
* refactor: strip out volume path in snapshot list / restore

chore: lint issue

* test: backups new include patterns
2026-02-18 21:45:19 +01:00

12 lines
298 B
TypeScript

import type { Volume } from "./types";
const VOLUME_MOUNT_BASE = "/var/lib/zerobyte/volumes";
export const getVolumeMountPath = (volume: Volume): string => {
if (volume.config.backend === "directory") {
return volume.config.path;
}
return `${VOLUME_MOUNT_BASE}/${volume.shortId}/_data`;
};