Rename project to docspell-cli

This commit is contained in:
Jan Bader
2026-07-19 20:28:05 +02:00
parent 9b5a9899b8
commit fc499af504
5 changed files with 15 additions and 22 deletions
+5 -5
View File
@@ -53,7 +53,7 @@ func runMountCommand(args []string, cfg config, password string) error {
if mountPoint == "" {
return fmt.Errorf("mount point missing: pass one or set MountPath in config")
}
if os.Getenv("DOCSPELL_IMPORT_MOUNT_FOREGROUND") != "1" {
if os.Getenv("DOCSPELL_CLI_MOUNT_FOREGROUND") != "1" {
return startMountInBackground(args, mountPoint, false)
}
if err := os.MkdirAll(mountPoint, 0755); err != nil {
@@ -73,7 +73,7 @@ func runMountCommand(args []string, cfg config, password string) error {
conn, err := fuse.Mount(
mountPoint,
fuse.FSName("docspell"),
fuse.Subtype("docspell-import"),
fuse.Subtype("docspell-cli"),
fuse.ReadOnly(),
)
if err != nil {
@@ -94,7 +94,7 @@ func startMountInBackground(args []string, mountPoint string, quiet bool) error
return nil
}
cmd := exec.Command(os.Args[0], append([]string{"mount"}, args...)...)
cmd.Env = append(os.Environ(), "DOCSPELL_IMPORT_MOUNT_FOREGROUND=1")
cmd.Env = append(os.Environ(), "DOCSPELL_CLI_MOUNT_FOREGROUND=1")
logFile, err := mountLogFile()
if err != nil {
return err
@@ -226,9 +226,9 @@ func cleanMountPath(path string) string {
func mountLogPath() string {
cacheDir, err := os.UserCacheDir()
if err != nil || cacheDir == "" {
return filepath.Join(os.TempDir(), "docspell-import-mount.log")
return filepath.Join(os.TempDir(), "docspell-cli-mount.log")
}
return filepath.Join(cacheDir, "docspell-import", "mount.log")
return filepath.Join(cacheDir, "docspell-cli", "mount.log")
}
func mountLogFile() (*os.File, error) {