Lines Matching full:srcpath
699 int movefileordir(char* srcpath, char* dstpath, int dstbasepos,
706 int srcend = strlen(srcpath);
709 if (lstat(srcpath, statbuf) < 0) {
710 LOGW("Unable to stat %s: %s\n", srcpath, strerror(errno));
717 LOGI("Renaming %s to %s (uid %d)\n", srcpath, dstpath, dstuid);
718 if (rename(srcpath, dstpath) >= 0) {
726 srcpath, dstpath, strerror(errno));
732 d = opendir(srcpath);
734 LOGW("Unable to opendir %s: %s\n", srcpath, strerror(errno));
749 LOGW("Source path too long; skipping: %s/%s\n", srcpath, name);
758 srcpath[srcend] = dstpath[dstend] = '/';
759 strcpy(srcpath+srcend+1, name);
762 if (movefileordir(srcpath, dstpath, dstbasepos, dstuid, dstgid, statbuf) != 0) {
766 // Note: we will be leaving empty directories behind in srcpath,
770 srcpath[srcend] = dstpath[dstend] = 0;
788 char srcpath[PKG_PATH_MAX];
842 if (!create_move_path(srcpath, PKG_DIR_PREFIX, srcpkg, buf+bufp) &&
844 movefileordir(srcpath, dstpath,
872 if (!create_pkg_path(srcpath, PKG_DIR_PREFIX, srcpkg,
874 if (lstat(srcpath, &s) < 0) {