diff --git a/src/apps/import.cpp b/src/apps/import.cpp index 6d457763a..a31771ce8 100644 --- a/src/apps/import.cpp +++ b/src/apps/import.cpp @@ -99,10 +99,10 @@ class import_parameters // For micrographs or movies if (do_movies || do_micrographs) { - if (fn_in.rfind("../", 0) == 0) + if (fn_in.rfind("../") != std::string::npos) // Forbid at any place REPORT_ERROR("Please don't import files outside the project directory.\nPlease make a symbolic link by an absolute path before importing."); - if (fn_in.rfind("/", 0) == 0) + if (fn_in.rfind("/", 0) == 0) // Forbid only at the beginning REPORT_ERROR("Please import files by a relative path.\nIf you want to import files outside the project directory, make a symbolic link by an absolute path and\nimport the symbolic link by a relative path."); std::string tablename = (do_movies) ? "movies" : "micrographs"; diff --git a/src/pipeline_jobs.cpp b/src/pipeline_jobs.cpp index 986cf50f1..46c54b5da 100644 --- a/src/pipeline_jobs.cpp +++ b/src/pipeline_jobs.cpp @@ -1127,13 +1127,13 @@ bool RelionJob::getCommandsImportJob(std::string &outputname, std::vector