Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions modules/nextflow/src/main/groovy/nextflow/Session.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import nextflow.exception.MissingLibraryException
import nextflow.exception.ScriptCompilationException
import nextflow.executor.ExecutorFactory
import nextflow.extension.CH
import nextflow.extension.FilesEx
import nextflow.file.FileHelper
import nextflow.file.FilePorter
import nextflow.plugin.Plugins
Expand Down Expand Up @@ -82,7 +83,6 @@ import nextflow.trace.event.TaskEvent
import nextflow.trace.event.WorkflowOutputEvent
import nextflow.util.Barrier
import nextflow.util.ClassLoaderFactory
import nextflow.util.Duration
import nextflow.util.HistoryFile
import nextflow.util.LoggerHelper
import nextflow.util.NameGenerator
Expand Down Expand Up @@ -445,7 +445,8 @@ class Session implements ISession {
*/
Session init( ScriptFile scriptFile, List<String> args=null, Map<String,?> cliParams=null, Map<String,?> configParams=null ) {

if(!workDir.mkdirs()) throw new AbortOperationException("Cannot create work-dir: $workDir -- Make sure you have write permissions or specify a different directory by using the `-w` command line option")
if(!workDir.mkdirs())
throw new AbortOperationException("Cannot create work-dir '${FilesEx.toUriString(workDir)}' -- Make sure you have write permissions or specify a different directory by using the `-w` command line option")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, you should be able to use workDir.toUriString() here and eliminate the extra import

log.debug "Work-dir: ${workDir.toUriString()} [${FileHelper.getPathFsType(workDir)}]"

if( config.bucketDir ) {
Expand Down
10 changes: 5 additions & 5 deletions modules/nf-commons/src/main/nextflow/extension/FilesEx.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ class FilesEx {
return true
}
catch(IOException e) {
log.debug "Failed to create directory '$self'", e
log.debug "Failed to create directory '${toUriString(self)}'", e
return false
}
}
Expand All @@ -515,7 +515,7 @@ class FilesEx {
Files.isReadable(self)
}
catch( IOException e ) {
log.trace("Cannot get read permission on file: $self -- Cause: ${e.getMessage()}")
log.trace("Cannot get read permission on file '${toUriString(self)}' -- Cause: ${e.getMessage()}")
return false
}
}
Expand All @@ -536,7 +536,7 @@ class FilesEx {
Files.isWritable(self)
}
catch( IOException e ) {
log.trace("Cannot get write permission on file: $self -- Cause: ${e.getMessage()}")
log.trace("Cannot get write permission on file '${toUriString(self)}' -- Cause: ${e.getMessage()}")
return false
}
}
Expand All @@ -560,7 +560,7 @@ class FilesEx {
Files.isExecutable(self)
}
catch( IOException e ) {
log.trace("Cannot get execute permission on file: $self -- Cause: ${e.getMessage()}")
log.trace("Cannot get execute permission on file '${toUriString(self)}' -- Cause: ${e.getMessage()}")
return false
}
}
Expand Down Expand Up @@ -590,7 +590,7 @@ class FilesEx {
Files.getLastModifiedTime(self,options).toMillis()
}
catch( IOException e ) {
log.trace "Cannot get lastModified time on file: $self -- Cause: ${e.getMessage()}"
log.trace "Cannot get lastModified time on file '${toUriString(self)}' -- Cause: ${e.getMessage()}"
return 0
}
}
Expand Down
Loading