Skip to content

Commit

Permalink
Merge pull request #1319 from haiwen/format-path
Browse files Browse the repository at this point in the history
[api] format dir path
  • Loading branch information
killing committed Jul 20, 2015
2 parents f50e063 + 50814f4 commit d7db1d6
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 99 deletions.
7 changes: 5 additions & 2 deletions common/fs-mgr.c
Expand Up @@ -2410,9 +2410,12 @@ seaf_fs_manager_get_dirent_by_path (SeafFSManager *mgr,
parent_dir = g_path_get_dirname(path);
file_name = g_path_get_basename(path);

if (strcmp (parent_dir, ".") == 0)
if (strcmp (parent_dir, ".") == 0) {
dir = seaf_fs_manager_get_seafdir (mgr, repo_id, version, root_id);
else
if (!dir) {
g_set_error (error, SEAFILE_DOMAIN, SEAF_ERR_DIR_MISSING, "directory is missing");
}
} else
dir = seaf_fs_manager_get_seafdir_by_path (mgr, repo_id, version,
root_id, parent_dir, error);

Expand Down

0 comments on commit d7db1d6

Please sign in to comment.