diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2013-12-28 20:08:54 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2013-12-28 20:08:54 +0100 |
commit | 3701f3f0dcf0f416eaa89d65bc9974161b110e5c (patch) | |
tree | 1c073419492908601ff515a5d88faa99e98b8f7e | |
parent | d4ae906c8f890d1ad5635ae1940b7e9e8b0ffc38 (diff) | |
download | digikam-android-3701f3f0dcf0f416eaa89d65bc9974161b110e5c.tar.gz digikam-android-3701f3f0dcf0f416eaa89d65bc9974161b110e5c.tar.bz2 digikam-android-3701f3f0dcf0f416eaa89d65bc9974161b110e5c.zip |
-rwxr-xr-x | digitaglinktree-1.8.4beta | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/digitaglinktree-1.8.4beta b/digitaglinktree-1.8.4beta index 1ebcdb6..c0625bf 100755 --- a/digitaglinktree-1.8.4beta +++ b/digitaglinktree-1.8.4beta @@ -441,7 +441,17 @@ sub createLinkTree{ if(length($opt_absolute)){ # Create link $sourceDir="${photoRootDir}$path/$image"; - $destDir="${linktreeRootDir}/$tag/$linkName"; + $destDir="${linktreeRootDir}/$tag$path/$linkName"; + + print "$sourceDir -> $destDir\n"; + + if ( ! -d "${linktreeRootDir}/$tag$path" ) { + $ret=mkpath("${linktreeRootDir}/$tag$path", 0, 0755); + } + + if( !$ret ){ + die "Cannot mkdir \"${linktreeRootDir}/$tag$path\"\n"; + } }else{ # Get relative path from absolute one # $rel=File::Spec->abs2rel( $path, $base ) ; @@ -837,6 +847,7 @@ sub usage{ " -C If -A <archdir> was given this option will put hardlinks of all\n", " photos in the \"$archiveDirPhotos\" directory not only of those with tags.\n", " -a Create absolute symbolic links instead of relative ones \n", + " and regenerate the original folder (album) structure for each tag \n", " -H Use hard links instead of symbolic links in linktree. \n", " -Y Add Year directory below each tag directory \n", " -f If there are hierarchical tags (tags that have subtags) \n", |