Loading commands/filesystem/cp.cpp +1 −1 Changes for commands/filesystem/cp.cpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ namespace fresh { namespace cmd { copy::Copier cp(o); bool intoDir=!targetDir.empty() || (!noTargetDir && (ops.size()>1 || isDir(dst))); if(noTargetDir && ops.size()>1){ std::cerr << "cp: extra operand '" << ops[1] << "'" << std::endl; return 1; } if(intoDir && !isDir(dst)){ std::cerr << "cp: target '" << dst << "' is not a directory" << std::endl; return 1; } if(intoDir && !isDir(dst)){ std::cerr << "cp: target '" << dst << "': Not a directory" << std::endl; return 1; } if(parents && !intoDir){ std::cerr << "cp: with --parents, the destination must be a directory" << std::endl; return 1; } bool ok=true; for(auto &s: ops){ Loading commands/filesystem/mv.cpp +1 −1 Changes for commands/filesystem/mv.cpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ namespace fresh { namespace cmd { } if(noTargetDir && ops.size()>1){ std::cerr << "mv: extra operand '" << ops[1] << "'" << std::endl; return 1; } bool intoDir=!targetDir.empty() || (!noTargetDir && (ops.size()>1 || isDir(dst))); if(intoDir && !isDir(dst)){ std::cerr << "mv: target '" << dst << "' is not a directory" << std::endl; return 1; } if(intoDir && !isDir(dst)){ std::cerr << "mv: target '" << dst << "': Not a directory" << std::endl; return 1; } bool ok=true; for(auto &s: ops){ std::string t=intoDir ? dst+(dst.back()=='/' ? "" : "/")+baseName(s) : dst; Loading Loading
commands/filesystem/cp.cpp +1 −1 Changes for commands/filesystem/cp.cpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ namespace fresh { namespace cmd { copy::Copier cp(o); bool intoDir=!targetDir.empty() || (!noTargetDir && (ops.size()>1 || isDir(dst))); if(noTargetDir && ops.size()>1){ std::cerr << "cp: extra operand '" << ops[1] << "'" << std::endl; return 1; } if(intoDir && !isDir(dst)){ std::cerr << "cp: target '" << dst << "' is not a directory" << std::endl; return 1; } if(intoDir && !isDir(dst)){ std::cerr << "cp: target '" << dst << "': Not a directory" << std::endl; return 1; } if(parents && !intoDir){ std::cerr << "cp: with --parents, the destination must be a directory" << std::endl; return 1; } bool ok=true; for(auto &s: ops){ Loading
commands/filesystem/mv.cpp +1 −1 Changes for commands/filesystem/mv.cpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ namespace fresh { namespace cmd { } if(noTargetDir && ops.size()>1){ std::cerr << "mv: extra operand '" << ops[1] << "'" << std::endl; return 1; } bool intoDir=!targetDir.empty() || (!noTargetDir && (ops.size()>1 || isDir(dst))); if(intoDir && !isDir(dst)){ std::cerr << "mv: target '" << dst << "' is not a directory" << std::endl; return 1; } if(intoDir && !isDir(dst)){ std::cerr << "mv: target '" << dst << "': Not a directory" << std::endl; return 1; } bool ok=true; for(auto &s: ops){ std::string t=intoDir ? dst+(dst.back()=='/' ? "" : "/")+baseName(s) : dst; Loading