1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-16 12:45:18 +03:00
aports/testing/nushell/0002-fix-timestamp-parsing-on-32-bit-platforms.patch

25 lines
1.1 KiB
Diff

From e1f455ad3bca47313b31086d85c15ab4384e9595 Mon Sep 17 00:00:00 2001
From: nibon7 <nibon7@163.com>
Date: Thu, 14 Apr 2022 20:58:01 +0800
Subject: [PATCH] fix timestamp parsing on 32-bit platforms
---
crates/nu-command/src/filesystem/touch.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crates/nu-command/src/filesystem/touch.rs b/crates/nu-command/src/filesystem/touch.rs
index bb10fd2b..8f3e7555 100644
--- a/crates/nu-command/src/filesystem/touch.rs
+++ b/crates/nu-command/src/filesystem/touch.rs
@@ -124,7 +124,7 @@ impl Command for Touch {
let size = val.len();
// Each stamp is a 2 digit number and the whole stamp must not be less than 4 or greater than 7 pairs
- if (size % 2 != 0 || !(8..=14).contains(&size)) || val.parse::<usize>().is_err() {
+ if (size % 2 != 0 || !(8..=14).contains(&size)) || val.parse::<u64>().is_err() {
return Err(ShellError::UnsupportedInput(
"input has an invalid timestamp".to_string(),
span,
--
2.35.1