Fix edit script to better preserve filename
This commit is contained in:
		
							parent
							
								
									b8c2c10fdb
								
							
						
					
					
						commit
						370d7a8e52
					
				
					 1 changed files with 6 additions and 4 deletions
				
			
		|  | @ -9,11 +9,13 @@ fi | ||||||
| 
 | 
 | ||||||
| edit_directory="$HOME/.cache/edit/" | edit_directory="$HOME/.cache/edit/" | ||||||
| 
 | 
 | ||||||
| mkdir -p $edit_directory | filehash=$(readlink -fn "$1" | md5sum | awk '{ print $1 }') | ||||||
|  | filedirectory="$edit_directory/$filehash/" | ||||||
|  | filedirectory=$(realpath -s "$filedirectory") | ||||||
|  | 
 | ||||||
|  | mkdir -p $filedirectory | ||||||
|  | filepath=$(realpath -s "$filedirectory/$(basename $1)") | ||||||
| 
 | 
 | ||||||
| filename=$(readlink -fn "$1" | md5sum | awk '{ print $1 }')-$(basename $1) |  | ||||||
| filepath="$edit_directory/$filename" |  | ||||||
| filepath=$(realpath -s "$filepath") |  | ||||||
| user=$(id -un) | user=$(id -un) | ||||||
| group=$(id -gn) | group=$(id -gn) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue