it does indeed work on windows
This commit is contained in:
parent
ebc2bcfb41
commit
52a0709097
3 changed files with 2 additions and 3 deletions
|
@ -48,7 +48,7 @@ fn smart_write<W: Write>(f: &mut W, writeables: &[Writable]) -> io::Result<()> {
|
||||||
f.write_all(&*path.as_os_str().as_bytes())?;
|
f.write_all(&*path.as_os_str().as_bytes())?;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
write!(f, "{}", path.as_os_str().to_string_lossy())?; // TODO: implement bonked strings for windows
|
write!(f, "{}", path.as_os_str().to_string_lossy())?; // TODO: implement bonked strings for windows
|
||||||
// f.write_all(&*path.as_os_str().encode_wide().collect::<Vec<u16>>())?;
|
// f.write_all(&*path.as_os_str().encode_wide().collect::<Vec<u16>>())?;
|
||||||
write!(f, "'''")?
|
write!(f, "'''")?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,6 @@ cfg_if! {
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
// TODO: test if this actually works on a windows machine
|
|
||||||
if #[cfg(windows)] {
|
if #[cfg(windows)] {
|
||||||
fn is_hidden(entry: &DirEntry) -> bool {
|
fn is_hidden(entry: &DirEntry) -> bool {
|
||||||
use std::os::windows::prelude::*;
|
use std::os::windows::prelude::*;
|
||||||
|
|
|
@ -92,7 +92,7 @@ cfg_if! {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_type(&self, data: &[u8]) -> Option<Mime> {
|
fn get_type(&self, data: &[u8]) -> Option<Mime> {
|
||||||
self.db.get_mime_type_for_data(&data).map(|m| m.0)
|
self.db.get_mime_type_for_data(data).map(|m| m.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue