Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: hidden dir showing up in pipes list

Louis Beaumontd335063b4c8c
diff --git a/screenpipe-app-tauri/scripts/pre_build.js b/screenpipe-app-tauri/scripts/pre_build.js
index d96c49a80..e384c7226 100644
--- a/screenpipe-app-tauri/scripts/pre_build.js
+++ b/screenpipe-app-tauri/scripts/pre_build.js
@@ -419,16 +419,21 @@ if (platform == 'macos') {
} else {
console.error("No suitable arm64 screenpipe binary found");
}
- // if the binary exists, hard code the fucking dylib
- if (await fs.exists('screenpipe-aarch64-apple-darwin') && !isDevMode) {
- await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe_arm64.dylib @rpath/../Frameworks/libscreenpipe_arm64.dylib ./screenpipe-aarch64-apple-darwin`
- await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe.dylib @rpath/../Frameworks/libscreenpipe.dylib ./screenpipe-aarch64-apple-darwin`
- console.log(`hard coded the FUCKING dylib`);
- } else if (await fs.exists('screenpipe-aarch64-apple-darwin') && isDevMode) {
- await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe_arm64.dylib @executable_path/../Frameworks/libscreenpipe_arm64.dylib ./screenpipe-aarch64-apple-darwin`
- await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe.dylib @executable_path/../Frameworks/libscreenpipe.dylib ./screenpipe-aarch64-apple-darwin`
- await $`install_name_tool -add_rpath @executable_path/../Frameworks ./screenpipe-aarch64-apple-darwin`
- console.log(`Updated dylib paths for arm64 in dev mode`);
+
+ try {
+ // if the binary exists, hard code the fucking dylib
+ if (await fs.exists('screenpipe-aarch64-apple-darwin') && !isDevMode) {
+ await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe_arm64.dylib @rpath/../Frameworks/libscreenpipe_arm64.dylib ./screenpipe-aarch64-apple-darwin`
+ await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe.dylib @rpath/../Frameworks/libscreenpipe.dylib ./screenpipe-aarch64-apple-darwin`
+ console.log(`hard coded the dylib`);
+ } else if (await fs.exists('screenpipe-aarch64-apple-darwin') && isDevMode) {
+ await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe_arm64.dylib @executable_path/../Frameworks/libscreenpipe_arm64.dylib ./screenpipe-aarch64-apple-darwin`
+ await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe.dylib @executable_path/../Frameworks/libscreenpipe.dylib ./screenpipe-aarch64-apple-darwin`
+ await $`install_name_tool -add_rpath @executable_path/../Frameworks ./screenpipe-aarch64-apple-darwin`
+ console.log(`Updated dylib paths for arm64 in dev mode`);
+ }
+ } catch (error) {
+ console.error('Error updating dylib paths:', error);
}
@@ -447,11 +452,16 @@ if (platform == 'macos') {
} else {
console.error("No suitable x86_64 screenpipe binary found");
}
- // hard code the fucking dylib
- if (await fs.exists('screenpipe-x86_64-apple-darwin') && !isDevMode) {
- await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe_x86_64.dylib @rpath/../Frameworks/libscreenpipe_x86_64.dylib ./screenpipe-x86_64-apple-darwin`
- await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe.dylib @rpath/../Frameworks/libscreenpipe.dylib ./screenpipe-x86_64-apple-darwin`
- console.log(`hard coded the FUCKING dylib`);
+
+ try {
+ // hard code the dylib
+ if (await fs.exists('screenpipe-x86_64-apple-darwin') && !isDevMode) {
+ await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe_x86_64.dylib @rpath/../Frameworks/libscreenpipe_x86_64.dylib ./screenpipe-x86_64-apple-darwin`
+ await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe.dylib @rpath/../Frameworks/libscreenpipe.dylib ./screenpipe-x86_64-apple-darwin`
+ console.log(`hard coded the dylib`);
+ }
+ } catch (error) {
+ console.error('Error updating dylib paths:', error);
}
}
diff --git a/screenpipe-server/src/pipe_manager.rs b/screenpipe-server/src/pipe_manager.rs
index 09db0ea0f..a9412d7c1 100644
--- a/screenpipe-server/src/pipe_manager.rs
+++ b/screenpipe-server/src/pipe_manager.rs
@@ -131,15 +131,15 @@ impl PipeManager {
let file_name = entry.file_name();
let pipe_id = file_name.to_string_lossy();
- // ignore hidden directories
- if !pipe_id.starts_with('.') {
+ // ignore hidden directories and files
+ if !pipe_id.starts_with('.') && entry.file_type().await.map(|ft| ft.is_dir()).unwrap_or(false) {
let config_path = entry.path().join("pipe.json");
- pipe_infos.push(Self::load_pipe_info(pipe_id.into_owned(), config_path));
+ pipe_infos.push(Self::load_pipe_info(pipe_id.into_owned(), config_path).await);
}
}
}
- futures::future::join_all(pipe_infos).await
+ pipe_infos
}
pub async fn download_pipe(&self, url: &str) -> Result<String> {