• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
File Size wrong on connected computer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

File Size wrong on connected computer


  • Subject: File Size wrong on connected computer
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Tue, 17 May 2005 16:01:50 +0200

I have two computers, called A and B and a homegrown program which I use to keep directories in sync between these computers.

If a file differs, it uses NSFileManager - (BOOL)copyPath:(NSString *)source toPath:(NSString *)destination handler:handler

Since a week one computer runs Tiger, the other is still Panther (10.3.9).
And now I see a interesting effect (quite often, but not reproducible).


A is connected to B (Network -> B -> Connect -> myUserName).

A runs my program which copies a file from B to A.
Now suddenly A has a wrong notion of the length of the file on B. (I can ask ls -l, Finder, whatever - always the same result).
Currently (always?) A thinks the file is shorter than it really is. E.g. A thinks its lenght is 5000 bytes, whereas B correctly says 6000.


When I look on A on this distant file (/Volumes/myUserName/some/file) I see the first 5000 bytes only.
When on B I edit the start of the file, I see the new edited data also on A - but only 5000 bytes.
When I edit the file on B to make it shorter than 5000 bytes (say 4000 bytes) I still see 5000 bytes on A; that is 4000 bytes from B + 1000 zeroes.


HexEdit run on A, NSFileManager copyPath: (from B to A) run on A - everybody on A just perceives the distant file to be 5000 bytes long.

Obviously some rather central authority did cache the size and just got it wrong.
And is not prepared to reconsider the size, even if the modification time changes.


Only when I edit the distant file on A the perceived size changes and the strange effect ends.

I have not stated which computer runs Tiger, as this does not matter.
Did not see this between two Panthers, did not try two Tigers.

Has anybody any ideas what might be going on? How to make it reproducible? How to avoid this strange effect?


Kind regards,

Gerriet.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Which QuickTime API?
  • Next by Date: Re: Size of comboboxes in an NSTableView / NSTableColumn
  • Previous by thread: Re: Sharing instances between NIB's?
  • Next by thread: NSTextView focus
  • Index(es):
    • Date
    • Thread