Skip to content

Commit

Permalink
Fix setups path chooser in preferences window
Browse files Browse the repository at this point in the history
- This was broken by #9
  • Loading branch information
parasyte committed Dec 14, 2021
1 parent f08ecf2 commit 3e79e2b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use copypasta::{ClipboardContext, ClipboardProvider};
use egui::widgets::color_picker::{color_edit_button_srgba, Alpha};
use egui::{CtxRef, Widget};
use hotwatch::Hotwatch;
use std::borrow::Cow;
use std::collections::{HashMap, VecDeque};
use std::path::Path;
use std::time::{Duration, Instant};
Expand Down Expand Up @@ -591,8 +592,10 @@ impl Gui {

// Setup exports path selection
ui.horizontal(|ui| {
let setups_path = self.config.get_setups_path();
let label = setups_path.to_string_lossy().ellipsis(50);
// XXX: Workaround for https://github.com/PolyMeilex/rfd/issues/32
let setups_path = self.config.get_setups_path().to_string_lossy();
let setups_path = setups_path.strip_prefix(r"\\?\").unwrap_or(&setups_path);
let label = Cow::Borrowed(setups_path).ellipsis(50);

ui.label("Setup exports path:");
if egui::Label::new(label)
Expand Down

0 comments on commit 3e79e2b

Please sign in to comment.