Skip to content

Commit 96fa89c

Browse files
authored
Merge pull request #117 from mikrostew/travis-publish
Fix so publishing universal docs stops failing
2 parents acb48fd + fa1f646 commit 96fa89c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

crates/notion-core/src/path/windows.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//! in a standard Notion layout in Windows operating systems.
33
44
use std::path::PathBuf;
5+
#[cfg(windows)]
56
use std::os::windows;
67
use std::io;
78

@@ -48,6 +49,7 @@ fn program_data_root() -> Fallible<PathBuf> {
4849
#[cfg(windows)]
4950
return Ok(winfolder::Folder::ProgramData.path().join("Notion"));
5051

52+
// "universal-docs" is built on a Unix machine, so we can't include Windows-specific libs
5153
#[cfg(feature = "universal-docs")]
5254
unimplemented!()
5355
}
@@ -132,6 +134,7 @@ fn program_files_root() -> Fallible<PathBuf> {
132134
#[cfg(windows)]
133135
return Ok(winfolder::Folder::ProgramFilesX64.path().join("Notion"));
134136

137+
// "universal-docs" is built on a Unix machine, so we can't include Windows-specific libs
135138
#[cfg(feature = "universal-docs")]
136139
unimplemented!()
137140
}
@@ -161,6 +164,7 @@ fn local_data_root() -> Fallible<PathBuf> {
161164
#[cfg(windows)]
162165
return Ok(winfolder::Folder::LocalAppData.path().join("Notion"));
163166

167+
// "universal-docs" is built on a Unix machine, so we can't include Windows-specific libs
164168
#[cfg(feature = "universal-docs")]
165169
unimplemented!()
166170
}
@@ -174,5 +178,10 @@ pub fn user_catalog_file() -> Fallible<PathBuf> {
174178
}
175179

176180
pub fn create_file_symlink(src: PathBuf, dst: PathBuf) -> Result<(), io::Error> {
177-
windows::fs::symlink_file(src, dst)
181+
#[cfg(windows)]
182+
return windows::fs::symlink_file(src, dst);
183+
184+
// "universal-docs" is built on a Unix machine, so we can't include Windows-specific libs
185+
#[cfg(feature = "universal-docs")]
186+
unimplemented!()
178187
}

0 commit comments

Comments
 (0)