Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(547)

Issue 5798062: code review 5798062: os: make FileInfo.Size() portable (zero on non-regular ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 6 months ago by bradfitz
Modified:
12 years, 4 months ago
Reviewers:
CC:
golang-dev
Visibility:
Public.

Description

os: make FileInfo.Size() portable (zero on non-regular files) This behavior was different between operating systems and bit us when writing tar files. Define the FileInfo.Size to be zero on non-regular files.

Patch Set 1 #

Patch Set 2 : diff -r c7af497373ff https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r c7af497373ff https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -15 lines) Patch
M src/pkg/os/os_test.go View 1 1 chunk +13 lines, -0 lines 0 comments Download
M src/pkg/os/stat_darwin.go View 1 2 chunks +1 line, -2 lines 0 comments Download
M src/pkg/os/stat_freebsd.go View 1 2 chunks +1 line, -2 lines 0 comments Download
M src/pkg/os/stat_linux.go View 1 2 chunks +1 line, -2 lines 0 comments Download
M src/pkg/os/stat_netbsd.go View 1 2 chunks +1 line, -2 lines 0 comments Download
M src/pkg/os/stat_openbsd.go View 1 2 chunks +1 line, -2 lines 0 comments Download
M src/pkg/os/stat_plan9.go View 1 2 chunks +3 lines, -1 line 0 comments Download
M src/pkg/os/stat_windows.go View 1 1 chunk +7 lines, -3 lines 0 comments Download
M src/pkg/os/types.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 15
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 6 months ago (2012-03-12 06:22:04 UTC) #1
dsymonds
LGTM
13 years, 6 months ago (2012-03-12 06:24:51 UTC) #2
bradfitz
I don't think this is risky or tricky, but it *is* late. Waiting on more ...
13 years, 6 months ago (2012-03-12 06:29:52 UTC) #3
r2
Where does this CL define that property? I see code but no definition. Nor am ...
13 years, 6 months ago (2012-03-12 07:08:54 UTC) #4
remyoudompheng
Same thing for symbolic links. I am used to symbolic links size to be the ...
13 years, 6 months ago (2012-03-12 07:27:17 UTC) #5
bradfitz
On Mon, Mar 12, 2012 at 12:08 AM, Rob 'Commander' Pike <r@google.com> wrote: > Where ...
13 years, 6 months ago (2012-03-12 15:17:20 UTC) #6
aram
Brad Fitzpatrick wrote: > > Go already doesn't let you read directories' bytes, though: > ...
13 years, 6 months ago (2012-03-12 16:36:24 UTC) #7
bradfitz
On Mon, Mar 12, 2012 at 9:36 AM, Aram Hăvărneanu <aram@mgk.ro> wrote: > Brad Fitzpatrick ...
13 years, 6 months ago (2012-03-12 16:59:52 UTC) #8
rsc
I think we should not make promises about Size here. Implementations will inevitably fail to ...
13 years, 6 months ago (2012-03-12 17:07:30 UTC) #9
aram
Brad Fitzpatrick wrote: > > I believe that's Linux, not Go. There are some Unices ...
13 years, 6 months ago (2012-03-12 17:11:44 UTC) #10
bradfitz
What about the one-liner documentation change I proposed as an alternative then? On Mon, Mar ...
13 years, 6 months ago (2012-03-12 17:11:52 UTC) #11
rsc
On Mon, Mar 12, 2012 at 13:11, Brad Fitzpatrick <bradfitz@golang.org> wrote: > What about the ...
13 years, 6 months ago (2012-03-12 17:27:40 UTC) #12
bradfitz
On Mon, Mar 12, 2012 at 10:27 AM, Russ Cox <rsc@golang.org> wrote: > On Mon, ...
13 years, 6 months ago (2012-03-12 17:32:18 UTC) #13
remyoudompheng
On 2012/03/12 17:07:30, rsc wrote: > I think we should not make promises about Size ...
13 years, 6 months ago (2012-03-12 18:35:56 UTC) #14
rsc
13 years, 3 months ago (2012-06-03 04:47:17 UTC) #15

          
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b