Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix directory opening in Linux #33

Merged
merged 5 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 1 addition & 28 deletions apps/desktop/src-tauri/src/utils/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,9 @@ pub fn open_directory(path: String) {

#[cfg(target_os = "linux")]
{
use std::fs;
use std::fs::metadata;
use std::path::PathBuf;
use std::process::Command;

if path.contains(",") {
// see https://gitlab.freedesktop.org/dbus/dbus/-/issues/76
let new_path = match metadata(&path).unwrap().is_dir() {
true => path,
false => {
let mut path2 = PathBuf::from(path);
path2.pop();
path2.into_os_string().into_string().unwrap()
}
};
Regular-Baf marked this conversation as resolved.
Show resolved Hide resolved
Command::new("xdg-open").arg(&new_path).spawn().unwrap();
} else {
Command::new("dbus-send")
.args([
"--session",
"--dest=org.freedesktop.FileManager1",
"--type=method_call",
"/org/freedesktop/FileManager1",
"org.freedesktop.FileManager1.ShowItems",
format!("array:string:\"file://{path}\"").as_str(),
"string:\"\"",
])
.spawn()
.unwrap();
}
Command::new("xdg-open").arg(&path).spawn().unwrap();
}

#[cfg(target_os = "macos")]
Expand Down
2 changes: 1 addition & 1 deletion models/wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const wizardModelMap: ModelMap = {

Req: >=32GB of CPU.
`,
modelType: ModelType.gpt2,
modelType: ModelType.Gpt2,
size: 5055134336,
downloadUrl:
"https://huggingface.co/TheBloke/WizardCoder-15B-1.0-GGML/resolve/dbbd1178c703672d16e7785f9685200f5a497c8b/WizardCoder-15B-1.0.ggmlv3.q5_1.bin",
Expand Down