realbasic-nug
[Top] [All Lists]

Re: Temp File Rename fails

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Temp File Rename fails
From: Kevin Windham <kevo at gatorgraphics dot com>
Date: Mon, 31 May 2004 08:14:49 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
List-help: <mailto:realbasic-nug-request@lists.realsoftware.com?subject=help>
List-id: REALbasic NUG <realbasic-nug.lists.realsoftware.com>
List-post: <mailto:realbasic-nug@lists.realsoftware.com>
References: <F442DB0E-B2B7-11D8-9EB8-000393B29272 at gatorgraphics dot com> <a06010229bce0cbd76227 at [10 dot 0 dot 1 dot 2]> <7BD1350B-B301-11D8-94B2-000393B29272 at gatorgraphics dot com> <a0601022cbce0dc4efcb9 at [10 dot 0 dot 1 dot 2]>

On May 31, 2004, at 8:04 AM, Thomas Reed wrote:
f.MoveFileTo tFile    //This works fine
tFile.Name = aRequest.filenames(i) //THIS FAILS TO RENAME ends up with name like Temp-1234

Well, that makes sense. You've moved the file, but tFile is still pointing to a file with a particular name in the temporary folder.

Doh, I knew I would screw up the copy paste. I was copying between both working and non-working versions.

that should say f.name = aRequest.filenames(i)

I watched it in the debugger to see what was happening, and the weird part is the folderitem name does change, it just didn't show up on disk.

Oh well, I'm not too concerned about it. The workaround is simple enough. What I'm more concerned about at this point is what happens when a user of my app has their storage folder on a different volume than the temp folder. Then I'm afraid my whole app will lock up during the move of the temp file. Haven't tested it yet, but I seem to remember running across that before.

I may end up having to write my own move routine anyway.

Kevin

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>