diff options
| -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",  | 
