[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: should KSaveFile::simpleBackupFile overwrite old backups?
From:       Thiago Macieira <thiago () kde ! org>
Date:       2008-12-23 23:13:08
Message-ID: 200812232113.16329.thiago () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Robby Stephenson wrote:
>Hi,
>
>I've run into some behavior with the KSaveFile::simpleBackupFile()
>functionality that I wanted to ask about. Essentially, the function
> doesn't do much more than append a backup extension (default is '~'),
> optionally modify the path, and then call QFile::copy().
>
>What I've run into is that QFile::copy returns false if the file exists.
> So while I would have expected repeated calls to simpleBackupFile() to
> repeatedly copy the existing file to the backup, it actually fails if
> the backup already exists. Am I reading that right?
>
>Is that the intended behavior? If so, perhaps we could add a note to the
> API saying the developer is expected to call QFile::remove() before
> backing up the file?

No. This sounds like it's a KSaveFile bug.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic