Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 80C4DD2C4 for ; Tue, 9 Oct 2012 21:38:53 +0000 (UTC) Received: (qmail 21506 invoked by uid 500); 9 Oct 2012 21:38:53 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 21482 invoked by uid 500); 9 Oct 2012 21:38:53 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 21472 invoked by uid 99); 9 Oct 2012 21:38:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2012 21:38:53 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shazron@gmail.com designates 209.85.220.175 as permitted sender) Received: from [209.85.220.175] (HELO mail-vc0-f175.google.com) (209.85.220.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2012 21:38:48 +0000 Received: by mail-vc0-f175.google.com with SMTP id p1so7509499vcq.6 for ; Tue, 09 Oct 2012 14:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=jEspH3SKMMoOPqGV+NPJ7eboaqOh562NP+5J/xx3b7I=; b=VKA8s5q8ODRsp4FPA5F8HC9BKSAeqYmZCIivgwhnbnknl2Wii1ojtrAwZXxxFbLYBG m/OoFebx+2HhO3XEgY1lZJ9+1CI9ckphwpsKrwQtqTMbxfwdbwSEDam+5fCSmvHZcpib V/Xt9AhgUHkfqAaJwBCnn2zuBdtNjIr4cuXFQiqknqw66LswpfoJT3H7vnA9Rg7ULVj8 yh3YVI08wnVX2kJRQTIHozFz+9FduKT0Hjo1Okiy6EggsYPEQGTQODGjFLOxGvAjeBO1 fGOQbImJT6hgO4EYLqjbMd70c0MVNvbSti3bBwp9a1brYwwJMoIZ369rgLiQDuETeyyY 3bdQ== Received: by 10.58.94.44 with SMTP id cz12mr13217935veb.34.1349818707945; Tue, 09 Oct 2012 14:38:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.211.232 with HTTP; Tue, 9 Oct 2012 14:37:47 -0700 (PDT) In-Reply-To: References: From: Shazron Date: Tue, 9 Oct 2012 14:37:47 -0700 Message-ID: Subject: Re: iOS : setMetadata on backup file/directory does not work To: callback-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org File a new bug just in case so this can be tracked. On Mon, Oct 1, 2012 at 11:28 PM, Clemens Wyss DEV wrote: > Environment: Cordova 2.0 on iOS > > Trying to set "do-not-copy-toiCloud"-metadata on the backuped WebSQL files/directories fails. > Here my code (mostly copied from http://docs.phonegap.com/en/2.1.0/cordova_file_file.md.html#FileEntry ): > > function setMetadata( filePath, metadataKey, metadataValue, isFile ) > { > var onSetMetadataWin = function() { > alert( "success setting metadata " + filePath ) > } > var onSetMetadataFail = function( error ) { > alert( "error setting metadata " + filePath + "(" + error + ")" ) > } > > var onGetFileWin = function(parent) { > parent.setMetadata(onSetMetadataWin, onSetMetadataFail, { metadataKey: metadataValue}); > } > var onGetFileFail = function() { > alert( "error getting file " + filePath ) > } > > var onFSWin = function(fileSystem) { > if ( isFile ) > fileSystem.root.getFile( filePath, { create: false, exclusive: false }, onGetFileWin, onGetFileFail ); > else > fileSystem.root.getDirectory( filePath, { create: false, exclusive: false }, onGetFileWin, onGetFileFail ); > } > > var onFSFail = function(evt) { > alert(evt.target.error.code); > } > > window.requestFileSystem( LocalFileSystem.PERSISTENT, 0, onFSWin, onFSFail ); > }... > setMetadata( "Backups/websqldbs.appdata.db", "com.apple.MobileBackup", 1, false ); > setMetadata( "Backups/websqlmain.appdata.db", "com.apple.MobileBackup", 1, true ); > > I end up in onSetMetadataFail, hence the file/directory-entry is found. > Unfortunately I don't know the structure oft he error object, so I have no details about the exact error ... > > Could this be related to https://issues.apache.org/jira/browse/CB-1566 ? >