mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 15:20:07 +02:00
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
From dcc3e419f837c268a497f94081c4ac0aa049f93c Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Sat, 24 Jun 2017 11:26:26 +0200
|
|
Subject: time_t isn't always an int32.
|
|
|
|
|
|
diff --git a/src/App.cpp b/src/App.cpp
|
|
index 25a4bac..b96b1b5 100644
|
|
--- a/src/App.cpp
|
|
+++ b/src/App.cpp
|
|
@@ -99,13 +99,21 @@ status_t ExtractQueryVolumes(BNode *node, vollist *volumes) {
|
|
// OpenTracker, that's it!
|
|
|
|
time_t created;
|
|
+ int64 created64;
|
|
+ int32 created32;
|
|
off_t capacity;
|
|
|
|
- for (int32 index = 0; msg.FindInt32("creationDate", index, &created) == B_OK;
|
|
+ for (int32 index = 0; msg.FindInt64("capacity", index, &capacity) == B_OK;
|
|
index++) {
|
|
-
|
|
- if ((msg.FindInt32("creationDate", index, &created) != B_OK)
|
|
- || (msg.FindInt64("capacity", index, &capacity) != B_OK))
|
|
+
|
|
+ if (msg.FindInt64("creationDate", index, &created64) != B_OK) {
|
|
+ if (msg.FindInt32("creationDate", index, &created32) != B_OK)
|
|
+ return B_ERROR;
|
|
+ created = created32;
|
|
+ } else
|
|
+ created = created64;
|
|
+
|
|
+ if (msg.FindInt64("capacity", index, &capacity) != B_OK)
|
|
return B_ERROR;
|
|
|
|
BVolume volume;
|
|
--
|
|
2.12.2
|
|
|