Logo Search packages:      
Sourcecode: ubuntuone-client version File versions

def ubuntuone::syncdaemon::filesystem_manager::FileSystemManager::_load_metadata_None (   self,
) [private]

Loads metadata from when it wasn't even versioned.

Definition at line 215 of file filesystem_manager.py.

00215                                               :
        '''Loads metadata from when it wasn't even versioned.'''
        logger("loading metadata from old version %r", old_version)

        for mdid in self.fs.keys():
            mdobj = self.fs[mdid]

            # assure path are bytes (new to version 2)
                mdobj["path"] = mdobj["path"].encode("utf8")
            except UnicodeDecodeError:
                # this is an invalid path, we shouldn't have it
                del self.fs[mdid]

            abspath = self.get_abspath(mdobj["share_id"], mdobj["path"])
            self._idx_path[abspath] = mdid
            if mdobj["node_id"] is not None:
                self._idx_node_id[(mdobj["share_id"], mdobj["node_id"])] = mdid

            # assure we have stat info (new to version 1)
            if os.path.exists(abspath):
                newstat = os.stat(abspath)
                newstat = None
            mdobj["stat"] = newstat
            self.fs[mdid] = mdobj

        # set new version
        with open(self._version_file, "w") as fh:

    def _load_metadata_1(self, old_version):

Generated by  Doxygen 1.6.0   Back to index