-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ignore windows platform for releasing and compilation because the com…
…pilation failed on unrar.
- Loading branch information
Showing
7 changed files
with
48 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#[cfg(target_os = "windows")] | ||
pub mod windows; | ||
|
||
#[cfg(any(target_os = "linux", target_os = "macos"))] | ||
pub mod linux; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use std::os::unix::fs::PermissionsExt; | ||
use std::path::PathBuf; | ||
|
||
use time::OffsetDateTime; | ||
use zip::write::SimpleFileOptions; | ||
use zip::DateTime; | ||
|
||
pub fn create(target: &PathBuf) -> SimpleFileOptions { | ||
let metadata = std::fs::metadata(&target).unwrap(); | ||
let mod_time = DateTime::try_from( | ||
OffsetDateTime::from(metadata.modified().unwrap())); | ||
|
||
SimpleFileOptions::default() | ||
.last_modified_time(mod_time.unwrap()) | ||
.compression_method(zip::CompressionMethod::Stored) | ||
.unix_permissions(metadata.permissions().mode()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
pub fn create(target: &PathBuf) -> SimpleFileOptions { | ||
let metadata = std::fs::metadata(&target).unwrap(); | ||
let mod_time = DateTime::try_from( | ||
OffsetDateTime::from(metadata.modified().unwrap())); | ||
|
||
SimpleFileOptions::default() | ||
.last_modified_time(mod_time.unwrap()) | ||
.compression_method(zip::CompressionMethod::Stored) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters