[PR #1682] [MERGED] Set decimal base for converting subseconds to int #2111

Closed
opened 2026-03-04 02:03:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/1682
Author: @CarstenGrohmann
Created: 6/16/2021
Status: Merged
Merged: 6/16/2021
Merged by: @gaul

Base: masterHead: string_to_time


📝 Commits (1)

  • 7dd982f Set decimal base for converting subseconds to int

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/metaheader.cpp (+1 -1)

📄 Description

The leading 0 triggers an automatic conversion as an octal value. This fails because it is a decimal value.

Setting the base to 10 prevents this automatism and treats the value as a decimal value.

Fixes:

[WAN] string_util.cpp:cvt_strtoofft(96): something error is occurred in convert std::string(017080564) to off_t, thus return 0 as default.

Related to #1676


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/1682 **Author:** [@CarstenGrohmann](https://github.com/CarstenGrohmann) **Created:** 6/16/2021 **Status:** ✅ Merged **Merged:** 6/16/2021 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `string_to_time` --- ### 📝 Commits (1) - [`7dd982f`](https://github.com/s3fs-fuse/s3fs-fuse/commit/7dd982f99613c197f0224df19a79d218b288bba9) Set decimal base for converting subseconds to int ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/metaheader.cpp` (+1 -1) </details> ### 📄 Description The leading 0 triggers an automatic conversion as an octal value. This fails because it is a decimal value. Setting the base to 10 prevents this automatism and treats the value as a decimal value. Fixes: ``` [WAN] string_util.cpp:cvt_strtoofft(96): something error is occurred in convert std::string(017080564) to off_t, thus return 0 as default. ``` Related to #1676 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:03:46 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#2111
No description provided.