Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 21 22:05:28 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id mAM65ROT029617 for ; Fri, 21 Nov 2008 22:05:27 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id mAM63CKc007000 for ; Fri, 21 Nov 2008 22:03:12 -0800 Message-Id: <200811220603.mAM63CKc007000@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Doubt with storing files Date: Fri, 21 Nov 2008 22:03:12 -0800 From: Bill Cheng Someone wrote: > In the case when a file exists and we try to overwrite it after asking the > user, instead of the original file being overwritten we get a new copy of > the file with an additional "?" appended to the original filename. > For eg. if "foo.wav" exists and we try to overwrite "foo.wav", instead of > "foo.wav" being overwritten, we get a copy of foo.wav stored as "foo.wav?". > When we compute the Sha1 hash of the file "foo.wav?" using the "openssl sha1 > foo1.wav"? command, the sha1 hash has the same value with the output > displayed as Sha1(foo.wav) and not Sha1(foo.wav?). Any clue on why the "?" > is being appended at the end? A bug?! Did you go into the debugger and see exactly what filename you are writing to? -- Bill Cheng // bill.cheng@usc.edu